Package org.geotools.data.directory

Examples of org.geotools.data.directory.DirectoryTypeCache.dispose()


        DirectoryTypeCache cache = new DirectoryTypeCache(tempDir, getFileStoreFactory());
        System.out.println(cache.getTypeNames());
        assertEquals(2, cache.getTypeNames().size());
        assertTrue(cache.getTypeNames().contains("archsites"));
        assertTrue(cache.getTypeNames().contains("bugsites"));
        cache.dispose();
    }
   
    @Test
    public void testAddNewDataStore() throws Exception {
        File f = copyShapefiles("shapes/bugsites.shp");
View Full Code Here


        Thread.sleep(DELAY);
        copyShapefiles("shapes/archsites.shp");
        assertEquals(2, cache.getTypeNames().size());
        assertTrue(cache.getTypeNames().contains("bugsites"));
        assertTrue(cache.getTypeNames().contains("archsites"));
        cache.dispose();
    }
   
    @Test
    public void testRemoveDataStore() throws Exception {
        File f = copyShapefiles("shapes/bugsites.shp");
View Full Code Here

        assertTrue(new File(tempDir, "archsites.dbf").delete());
        assertTrue(new File(tempDir, "archsites.shx").delete());
        System.out.println(Arrays.asList(tempDir.listFiles()));
        assertEquals(1, cache.getTypeNames().size());
        assertTrue(cache.getTypeNames().contains("bugsites"));
        cache.dispose();
    }
   
    @Test
    public void testRemoveType() throws Exception {
        File f = copyShapefiles("shapes/bugsites.shp");
View Full Code Here

        // time has a os specific time resolution
        Thread.sleep(DELAY);
        assertTrue(new File(tempDir, "archsites.shp").delete());
        assertEquals(1, cache.getTypeNames().size());
        assertTrue(cache.getTypeNames().contains("bugsites"));
        cache.dispose();
    }
   
    @Test
    public void testAddType() throws Exception {
        File f = copyShapefiles("shapes/bugsites.shp");
View Full Code Here

        Thread.sleep(DELAY);
        copyShapefiles("shapes/archsites.shp");
        assertEquals(2, cache.getTypeNames().size());
        assertTrue(cache.getTypeNames().contains("bugsites"));
        assertTrue(cache.getTypeNames().contains("archsites"));
        cache.dispose();
    }

}
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.