WFS_1_1_0_DataStore implements WFSDataStore { public String[] getTypeNames() throws IOException { Set<QName> featureTypeNames = wfs.getFeatureTypeNames(); List<String> sorted = new ArrayList<String>(featureTypeNames.size()); for (QName name : featureTypeNames) { sorted.add(name.getPrefix() + ":" + name.getLocalPart()); } Collections.sort(sorted); return sorted.toArray(new String[sorted.size()]); } WFS_1_1_0_DataStore(final WFSProtocol wfs); void setMappedURIs(Map<String, String> mappedURIs); void setAxisOrder(String axisOrderOutput, String axisOrderFilter); String getAxisOrderForOutput(); String getAxisOrderForFilter(); void setNamespaceOverride(String namespaceOverride); void setMaxFeatures(Integer maxFeatures); Integer getMaxFeatures(); boolean isPreferPostOverGet(); void setPreferPostOverGet(Boolean booleanValue); WFSServiceInfo getInfo(); SimpleFeatureType getSchema(final String prefixedTypeName); SimpleFeatureType getSchema(Name name); List<Name> getNames(); String[] getTypeNames(); void dispose(); static boolean invertAxisNeeded(String axisOrder,
            CoordinateReferenceSystem crs); FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader(Query query,
            final Transaction transaction); WFSFeatureSource getFeatureSource(final String typeName); LockingManager getLockingManager(); 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); SimpleFeatureSource getFeatureSource(Name typeName); void updateSchema(Name typeName, SimpleFeatureType featureType); void updateSchema(String typeName, SimpleFeatureType featureType); void createSchema(SimpleFeatureType featureType); QName getFeatureTypeName(String typeName); String getFeatureTypeTitle(String typeName); String getFeatureTypeAbstract(String typeName); ReferencedEnvelope getFeatureTypeWGS84Bounds(String typeName); ReferencedEnvelope getFeatureTypeBounds(String typeName); CoordinateReferenceSystem getFeatureTypeCRS(String typeName); Set<String> getFeatureTypeKeywords(String typeName); URL getDescribeFeatureTypeURL(String typeName); String getServiceAbstract(); Set<String> getServiceKeywords(); URI getServiceProviderUri(); URL getCapabilitiesURL(); String getServiceTitle(); String getServiceVersion(); ReferencedEnvelope getBounds(final Query query); int getCount(Query query); @Override String toString(); @Override void setUseDefaultSRS(Boolean useDefaultSRS); void setGetFeatureOutputFormat(String outputFormat); @Override void removeSchema(String typeName); @Override void removeSchema(Name typeName);  }
@Test public void testGetTypeNames() throws IOException { String[] expected = {"gubs:GovernmentalUnitCE", "gubs:GovernmentalUnitMCD", "gubs:GovernmentalUnitST", "hyd:HydroElementARHI", "hyd:HydroElementARMD", "hyd:HydroElementFLHI", "hyd:HydroElementFLMD", "hyd:HydroElementLIHI", "hyd:HydroElementLIMD", "hyd:HydroElementPTHI", "hyd:HydroElementPTMD", "hyd:HydroElementWBHI", "hyd:HydroElementWBMD", "trans:RoadSeg"}; List<String> expectedTypeNames = Arrays.asList(expected); createTestProtocol(CUBEWERX_GOVUNITCE.CAPABILITIES); WFS_1_1_0_DataStore ds = new WFS_1_1_0_DataStore(wfs); String[] typeNames = ds.getTypeNames(); assertNotNull(typeNames); List<String> names = Arrays.asList(typeNames); assertEquals(expectedTypeNames.size(), names.size()); assertEquals(expectedTypeNames, names); }