QueryType queryType = (QueryType) request.getQuery().get(fcIndex);
// may have multiple type names in each query, so add them all
for (QName name : (List<QName>) queryType.getTypeName()) {
// get a feature type name from the query
Name featureTypeName = new NameImpl(name.getNamespaceURI(), name.getLocalPart());
FeatureTypeInfo meta = catalog.getFeatureTypeByName(featureTypeName);
if (meta == null) {
throw new WFSException("Could not find feature type " + featureTypeName
+ " in the GeoServer catalog");
}
// add it to the map
Set<FeatureTypeInfo> metas = ns2metas.get(featureTypeName.getNamespaceURI());
if (metas == null) {
metas = new HashSet<FeatureTypeInfo>();
ns2metas.put(featureTypeName.getNamespaceURI(), metas);
}
metas.add(meta);
}
} else {
FeatureType featureType = ((FeatureCollection) featureCollections.get(fcIndex)).getSchema();