Package org.geotools.data

Examples of org.geotools.data.DataStore.dispose()


            t.commit();
        } catch (Throwable eek) {
            t.rollback();
        } finally {
            t.close();
            store.dispose();
        }
        // removeAllExample end
        System.out.println("\nremoveAllExample end\n");
       
        fileContents("removeAllExample",file);
View Full Code Here


        DataStore ds = null;
        try {
            ds = DataStoreFinder.getDataStore(params);
            if(ds != null) {
                ds.createSchema(featureType);
                ds.dispose();
                cache.refreshCacheContents();
            }
        } catch(Exception e) {
            throw (IOException) new IOException("Error creating new data store").initCause(e);
        }
View Full Code Here

        b.add("geom", Point.class);
        b.add("name", String.class);

        DataStore data = factory.createDataStore(map);
        data.createSchema(b.buildFeatureType());
        data.dispose();

        assertTrue(new File(tmp.getRoot(), "foo.gpkg").exists());
    }
}
View Full Code Here

        System.out.println("t2 commit          t1: "+DataUtilities.fidSet(featureStore1.getFeatures()) );
        System.out.println("t2 commit          t2: "+DataUtilities.fidSet(featureStore2.getFeatures()) );

        t1.close();
        t2.close();
        store.dispose(); // clear out any listeners
        // transactionExample end
        System.out.println("\ntransactionExample end\n");
    }

    private static void removeAllExample() throws Exception {
View Full Code Here

            t.commit();
        } catch (Throwable eek) {
            t.rollback();
        } finally {
            t.close();
            store.dispose();
        }
        // removeAllExample end
        System.out.println("\nremoveAllExample end\n");
    }
View Full Code Here

            }

        } finally {
            try {
                if (store != null) {
                    store.dispose();
                }
            } catch (Exception e) {
            }
            try {
                if (reader != null) {
View Full Code Here

            featureType = new SimpleFeatureTypeImpl(new NameImpl(noGeomLast), schema, null, false,
                    null, null, null);
            ds.createSchema(featureType);
        } finally {
            if (ds != null) {
                ds.dispose();

            }
        }

        // now start the test (may fails since some schema does not contains geometries and Utils.SCAN_FOR_TYPENAMES is not specified)
View Full Code Here

            assertTrue(true);
        }
        dataStore = DataStoreFinder.getDataStore(workingParams);
        assertNotNull(dataStore);
        assertTrue(dataStore instanceof ArcSDEDataStore);
        dataStore.dispose();
    }

    @Test
    public void testDataStoreFinderFindsIt() throws IOException {
        Iterator<DataStoreFactorySpi> allFactories = DataStoreFinder.getAllDataStores();
View Full Code Here

        }

        DataStore store = dsFactory.createDataStore(workingParams);
        assertNotNull(store);
        assertTrue(store instanceof ArcSDEDataStore);
        store.dispose();
    }

    /**
     * Test method for
     * {@link org.geotools.arcsde.ArcSDEDataStoreFactory#createDataStore(java.util.Map)}.
View Full Code Here

        assertNotNull(store);

        SimpleFeatureType viewType = store.getSchema(InProcessViewSupportTestData.typeName);
        assertNotNull(viewType);
        assertEquals(InProcessViewSupportTestData.typeName, viewType.getTypeName());
        store.dispose();
    }

    @Test
    public void testVersionParamCheck() throws IOException, UnavailableConnectionException {
        ISession session = testData.getConnectionPool().getSession(true);
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.