namespaceURI = catalog.getDefaultNamespace().getURI();
}
LOGGER.fine("Locating FeatureSource uri:'" + namespaceURI + "' name:'" + name + "'");
final FeatureTypeInfo meta = catalog.getFeatureTypeByName(namespaceURI, name);
if (meta == null) {
String msg = "Feature type '" + name + "' is not available: ";
String handle = (String) EMFUtils.get(element, "handle");
throw new WFSTransactionException(msg, (String) null, handle);
}
featureTypeInfos.put(typeName, meta);
}
// check element validity
handler.checkValidity(element, featureTypeInfos);
// go through all feature type infos data objects, and load feature
// stores
for (Iterator m = featureTypeInfos.values().iterator(); m.hasNext();) {
FeatureTypeInfo meta = (FeatureTypeInfo) m.next();
String typeRef = meta.getStore().getName() + ":" + meta.getName();
String URI = meta.getNamespace().getURI();
QName elementName = new QName(URI, meta.getName(),
meta.getNamespace().getPrefix());
QName elementNameDefault = null;
if (catalog.getDefaultNamespace().getURI().equals(URI)) {
elementNameDefault = new QName(meta.getName());
}
LOGGER.fine("located FeatureType w/ typeRef '" + typeRef + "' and elementName '"
+ elementName + "'");
if (stores.containsKey(elementName)) {
// typeName already loaded
continue;
}
try {
FeatureSource<? extends FeatureType, ? extends Feature> source = meta.getFeatureSource(null,null);
if (source instanceof FeatureStore) {
FeatureStore<? extends FeatureType, ? extends Feature> store;
store = (FeatureStore<? extends FeatureType, ? extends Feature>) source;
store.setTransaction(transaction);