Examples of createDataStore()


Examples of org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore()

            session.dispose();
        }

        Map<String, Serializable> params = new HashMap<String, Serializable>(testData.getConProps());
        ArcSDEDataStoreFactory factory = new ArcSDEDataStoreFactory();
        defaultVersionDataStore = factory.createDataStore(params);

        params.put(ArcSDEDataStoreConfig.VERSION_PARAM_NAME, version1);
        version1DataStore = factory.createDataStore(params);

        params.put(ArcSDEDataStoreConfig.VERSION_PARAM_NAME, version2);
View Full Code Here

Examples of org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore()

        Map<String, Serializable> params = new HashMap<String, Serializable>(testData.getConProps());
        ArcSDEDataStoreFactory factory = new ArcSDEDataStoreFactory();
        defaultVersionDataStore = factory.createDataStore(params);

        params.put(ArcSDEDataStoreConfig.VERSION_PARAM_NAME, version1);
        version1DataStore = factory.createDataStore(params);

        params.put(ArcSDEDataStoreConfig.VERSION_PARAM_NAME, version2);
        version2DataStore = factory.createDataStore(params);
    }
View Full Code Here

Examples of org.geotools.arcsde.ArcSDEDataStoreFactory.createDataStore()

        params.put(ArcSDEDataStoreConfig.VERSION_PARAM_NAME, version1);
        version1DataStore = factory.createDataStore(params);

        params.put(ArcSDEDataStoreConfig.VERSION_PARAM_NAME, version2);
        version2DataStore = factory.createDataStore(params);
    }

    @After
    public void tearDown() throws Exception {
        defaultVersionDataStore.dispose();
View Full Code Here

Examples of org.geotools.data.AbstractDataStoreFactory.createDataStore()

        testDataStore.addFeature(f7);
        testDataStore.addFeature(f8);
        testDataStore.createSchema(builder4.buildFeatureType());

        final AbstractDataStoreFactory factory = mock(AbstractDataStoreFactory.class);
        when(factory.createDataStore(anyMapOf(String.class, Serializable.class))).thenReturn(
                testDataStore);
        when(factory.canProcess(anyMapOf(String.class, Serializable.class))).thenReturn(true);

        return factory;
    }
View Full Code Here

Examples of org.geotools.data.AbstractDataStoreFactory.createDataStore()

    public static AbstractDataStoreFactory createEmptyTestFactory() throws Exception {

        MemoryDataStore testDataStore = new MemoryDataStore();

        final AbstractDataStoreFactory factory = mock(AbstractDataStoreFactory.class);
        when(factory.createDataStore(anyMapOf(String.class, Serializable.class))).thenReturn(
                testDataStore);
        when(factory.canProcess(anyMapOf(String.class, Serializable.class))).thenReturn(true);

        return factory;
    }
View Full Code Here

Examples of org.geotools.data.AbstractDataStoreFactory.createDataStore()

    }

    public static AbstractDataStoreFactory createNullTestFactory() throws Exception {

        final AbstractDataStoreFactory factory = mock(AbstractDataStoreFactory.class);
        when(factory.createDataStore(anyMapOf(String.class, Serializable.class))).thenReturn(null);
        when(factory.canProcess(anyMapOf(String.class, Serializable.class))).thenReturn(true);

        return factory;
    }
View Full Code Here

Examples of org.geotools.data.AbstractDataStoreFactory.createDataStore()

        when(testDataStore.getNames()).thenThrow(new IOException());
        when(testDataStore.getTypeNames()).thenThrow(new RuntimeException());
        when(testDataStore.getSchema(anyString())).thenThrow(new IOException());

        final AbstractDataStoreFactory factory = mock(AbstractDataStoreFactory.class);
        when(factory.createDataStore(anyMapOf(String.class, Serializable.class))).thenReturn(
                testDataStore);
        when(factory.canProcess(anyMapOf(String.class, Serializable.class))).thenReturn(true);

        return factory;
    }
View Full Code Here

Examples of org.geotools.data.AbstractDataStoreFactory.createDataStore()

        MemoryDataStore spyDataStore = spy(testDataStore);

        when(spyDataStore.getFeatureSource("table1")).thenThrow(new IOException("Exception"));

        final AbstractDataStoreFactory factory = mock(AbstractDataStoreFactory.class);
        when(factory.createDataStore(anyMapOf(String.class, Serializable.class))).thenReturn(
                spyDataStore);
        when(factory.canProcess(anyMapOf(String.class, Serializable.class))).thenReturn(true);

        return factory;
    }
View Full Code Here

Examples of org.geotools.data.DataAccessFactory.createDataStore()

            DataAccessFactory factory = getPreviousPage().getFactory();
            connectionParameters = getParams();

            if (factory.canProcess(connectionParameters)) {
                try {
                    factory.createDataStore(connectionParameters);
                    isConnected = true;
                } catch (IOException e) {
                    setErrorMessage(e.toString());
                }
            }
View Full Code Here

Examples of org.geotools.data.DataAccessFactory.createDataStore()

        DataAccessFactory factory = aquireFactory(params);
        if (factory == null) {
            return null;
        }

        DataAccess<? extends FeatureType, ? extends Feature> store = factory
                .createDataStore(params);
        if (store == null) {
            return null;
        }
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.