// get a feature type name from the query
Name featureTypeName = new NameImpl(name.getNamespaceURI(), name.getLocalPart());
ResourceInfo meta = catalog.getResourceByName(featureTypeName, ResourceInfo.class);
if (meta == null) {
throw new WFSException(request, "Could not find feature type " + featureTypeName
+ " in the GeoServer catalog");
}
// add it to the map
Set<ResourceInfo> metas = ns2metas.get(featureTypeName.getNamespaceURI());
if (metas == null) {
metas = new HashSet<ResourceInfo>();
ns2metas.put(featureTypeName.getNamespaceURI(), metas);
}
metas.add(meta);
}
} else {
FeatureType featureType = ((FeatureCollection) featureCollections.get(fcIndex)).getSchema();
//load the metadata for the feature type
String namespaceURI = featureType.getName().getNamespaceURI();
FeatureTypeInfo meta = catalog.getFeatureTypeByName(featureType.getName());
if(meta == null)
throw new WFSException(request, "Could not find feature type " +
featureType.getName() + " in the GeoServer catalog");
//add it to the map
Set metas = (Set) ns2metas.get(namespaceURI);