|
From: <svn...@os...> - 2012-01-06 03:34:02
|
Author: ang05a
Date: 2012-01-05 19:33:55 -0800 (Thu, 05 Jan 2012)
New Revision: 38467
Modified:
trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/config/FeatureTypeRegistry.java
Log:
GEOT-4002:App schema throws IOException when swe.xsd version 2.0 is used
Modified: trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/config/FeatureTypeRegistry.java
===================================================================
--- trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/config/FeatureTypeRegistry.java 2012-01-05 16:18:59 UTC (rev 38466)
+++ trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/config/FeatureTypeRegistry.java 2012-01-06 03:33:55 UTC (rev 38467)
@@ -20,13 +20,11 @@
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
-import java.util.Set;
import java.util.Stack;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -38,9 +36,6 @@
import org.eclipse.xsd.XSDAttributeUseCategory;
import org.eclipse.xsd.XSDComplexTypeDefinition;
import org.eclipse.xsd.XSDElementDeclaration;
-import org.eclipse.xsd.XSDSchema;
-import org.eclipse.xsd.XSDSchemaContent;
-import org.eclipse.xsd.XSDSchemaDirective;
import org.eclipse.xsd.XSDTypeDefinition;
import org.geotools.feature.Types;
import org.geotools.feature.type.ComplexFeatureTypeFactoryImpl;
@@ -130,8 +125,6 @@
private FeatureTypeFactory typeFactory;
- private NamespaceSupport namespaces;
-
/**
* stack of currently being built type names, used by
* {@link #createType(Name, XSDTypeDefinition)} to prevent recursive type definitions by
@@ -145,7 +138,6 @@
}
public FeatureTypeRegistry(NamespaceSupport namespaces) {
- this.namespaces = namespaces;
schemas = new ArrayList<SchemaIndex>();
typeFactory = new ComplexFeatureTypeFactoryImpl();
descriptorRegistry = new HashMap<Name, AttributeDescriptor>();
@@ -474,7 +466,9 @@
if (baseType != null) {
String targetNamespace = baseType.getTargetNamespace();
String name = baseType.getName();
- superType = getType(targetNamespace, name);
+ if (name != null) {
+ superType = getType(targetNamespace, name);
+ }
if (superType == null) {
superType = createType(baseType, crs, attMappings);
}
|