Examples of canProcess()


Examples of org.geotools.data.georest.GeoRestDataStoreFactory.canProcess()

    private static final FilterFactory2 FF = CommonFactoryFinder.getFilterFactory2(null);

    public void testFactoryCanProcess() {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        Assert.assertTrue(factory.canProcess(createParams()));
    }

    public void testCreateDataStore() throws IOException {
        GeoRestDataStoreFactory factory = new GeoRestDataStoreFactory();
        DataStore ds = factory.createDataStore(createParams());
View Full Code Here

Examples of org.geotools.data.mysql.MySQLDataStoreFactory.canProcess()

        dsInstantiationLock.lock();
        try {
            if (ds == null) {
                changed = true;
                MySQLDataStoreFactory dsf = MySQLServiceExtension.getFactory();
                if (dsf.canProcess(params)) {
                    try {
                        ds = dsf.createDataStore(params);
                    } catch (IOException e) {
                        msg = e;
                        throw e;
View Full Code Here

Examples of org.geotools.data.oracle.OracleNGDataStoreFactory.canProcess()

            try {
                if (ds == null) {
                    OracleNGDataStoreFactory dsf = new OracleNGDataStoreFactory();
                    checkPort(params);
                    assert params.get("port") instanceof String; //$NON-NLS-1$
                    if (dsf.canProcess(params)) {
                        try {
                            ds = dsf.createDataStore(params);
                        } catch (IOException e) {
                            msg = e;
                            throw e;
View Full Code Here

Examples of org.geotools.data.postgis.PostgisNGDataStoreFactory.canProcess()

        params.put(PASSWD.key, db.getProperty(PASSWD.key));
        params.put(DBTYPE.key, "postgis");
        params.put(PostgisNGDataStoreFactory.CREATE_DB_IF_MISSING.key, true);

        // we can work with it
        assertTrue(factory.canProcess(params));
       
        // force database creation and check the store functions
        JDBCDataStore store = factory.createDataStore(params);
        assertNotNull(store);
        store.createSchema(DataUtilities.createType("test", "id:String,polygonProperty:Polygon:srid=32615"));
View Full Code Here

Examples of org.geotools.data.shapefile.ShapefileDataStoreFactory.canProcess()

    }

    @Override
    protected String doOtherChecks( Map<String, Serializable> params ) {
        ShapefileDataStoreFactory factory = getSHPDSFactory();
        if( !factory.canProcess(params) ) {
            // this is tough we don't have a good error message out of the geotools factory canProcess method
            // So we will try (and fail!) to connect ...
            DataStore datastore = null;
            try {
                datastore = factory.createDataStore(params);
View Full Code Here

Examples of org.geotools.data.shapefile.ShapefileDataStoreFactory.canProcess()

        if (ds == null) {
            dsInstantiationLock.lock();
            try {
                if (ds == null) {
                    ShapefileDataStoreFactory dsf = new ShapefileDataStoreFactory();
                    if (dsf.canProcess(params)) {

                        try {
                            ds = (ShapefileDataStore) dsf.createDataStore(params);
                            // openIndexGenerationDialog(ds);
                            // hit it lightly to make sure it exists.
View Full Code Here

Examples of org.geotools.data.shapefile.ShapefileDirectoryFactory.canProcess()

    public void testSpaces() throws Exception {
        Map params = new HashMap();
        params.put(ShapefileDataStoreFactory.URLP.key, tempDir.toURI().toURL());
        params.put(ShapefileDataStoreFactory.NAMESPACEP.key, "http://www.geotools.org");
        ShapefileDirectoryFactory factory = new ShapefileDirectoryFactory();
        assertTrue(factory.canProcess(params));
        DataStore store = factory.createDataStore(params);
        assertNotNull(store);
        assertEquals(2, store.getNames().size());
        store.dispose();
    }
View Full Code Here

Examples of org.geotools.data.shapefile.ShapefileDirectoryFactory.canProcess()

    public void testSpacesPlainToURL() throws Exception {
        Map params = new HashMap();
        params.put(ShapefileDataStoreFactory.URLP.key, tempDir.toURI().toURL());
        params.put(ShapefileDataStoreFactory.NAMESPACEP.key, "http://www.geotools.org");
        ShapefileDirectoryFactory factory = new ShapefileDirectoryFactory();
        assertTrue(factory.canProcess(params));
        DataStore store = factory.createDataStore(params);
    assertNotNull(store);
    store.dispose();
    }
}
View Full Code Here

Examples of org.locationtech.udig.catalog.ui.UDIGConnectionFactory.canProcess()

        descriptor = null;
        shortlist = new ArrayList<UDIGConnectionFactoryDescriptor>();
        for( UDIGConnectionFactoryDescriptor d : descriptors ) {
            UDIGConnectionFactory factory = d.getConnectionFactory();
            try {
                if (factory.canProcess(context)) {
                    shortlist.add( d );
                }
            } catch (Throwable t) {
                // log and keep going
                CatalogPlugin.trace("Factory "+d.getId()+" unable to handle "+context, t);
View Full Code Here

Examples of org.locationtech.udig.catalog.ui.UDIGConnectionFactory.canProcess()

                if (!"factory".equals(element.getName())) //$NON-NLS-1$
                    return;
                UDIGConnectionFactory factory = (UDIGConnectionFactory) element
                        .createExecutableExtension("class"); //$NON-NLS-1$

                if (factory.canProcess(data)) {
                    // get the id
                    IConfigurationElement[] elements = extension.getConfigurationElements();
                    for( int i = 0; i < elements.length; i++ ) {
                        if( elements[i].getAttribute("id") != null){
                            ids.add(elements[i].getAttribute("id")); //$NON-NLS-1$
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.