DirectoryDataStore implements DataStore { public String[] getTypeNames() throws IOException { Set<String> typeNames = cache.getTypeNames(); return typeNames.toArray(new String[typeNames.size()]); } DirectoryDataStore(File directory, URI namespaceURI); FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(
            Query query, Transaction transaction); FeatureSource<SimpleFeatureType, SimpleFeature> getFeatureSource(
            String typeName); FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriter(
            String typeName, Filter filter, Transaction transaction); FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriter(
            String typeName, Transaction transaction); FeatureWriter<SimpleFeatureType, SimpleFeature> getFeatureWriterAppend(
            String typeName, Transaction transaction); LockingManager getLockingManager(); SimpleFeatureType getSchema(String typeName); String[] getTypeNames(); FeatureSource<SimpleFeatureType, SimpleFeature> getView(Query query); void updateSchema(String typeName, SimpleFeatureType featureType); void createSchema(SimpleFeatureType featureType); void dispose(); FeatureSource<SimpleFeatureType, SimpleFeature> getFeatureSource(
            Name typeName); ServiceInfo getInfo(); List<Name> getNames(); SimpleFeatureType getSchema(Name name); void updateSchema(Name typeName, SimpleFeatureType featureType); DataStore getDataStore(String typeName);  }
@Test public void testTypeNames() throws Exception { copyFile("Bridges.properties", DESTDIR); copyFile("Buildings.properties", DESTDIR); copyShapefiles("shapes/archsites.shp"); File f = copyShapefiles("shapes/bugsites.shp"); tempDir = f.getParentFile(); DataStore store = new DirectoryDataStore(tempDir, NSURI); List<String> typeNames = Arrays.asList(store.getTypeNames()); assertEquals(4, typeNames.size()); assertTrue(typeNames.contains("archsites")); assertTrue(typeNames.contains("bugsites")); assertTrue(typeNames.contains("Bridges")); assertTrue(typeNames.contains("Buildings")); }