private AttributeType createProxiedType(final Name assignedName,
final XSDTypeDefinition typeDefinition, Map typeRegistry) {
AttributeType type;
if (null == typeDefinition.getSimpleType()
&& typeDefinition instanceof XSDComplexTypeDefinition) {
boolean isFeatureType = isDerivedFrom(typeDefinition, GML.getAbstractFeatureType());
if (isFeatureType) {
type = new FeatureTypeProxy(assignedName, typeRegistry);
} else {
type = new ComplexTypeProxy(assignedName, typeRegistry);
}
} else {
boolean isGeometryType = isDerivedFrom(typeDefinition, GML.getAbstractGeometryType());
if (isGeometryType) {
type = new GeometryTypeProxy(assignedName, typeRegistry);
} else {
type = new AttributeTypeProxy(assignedName, typeRegistry);
}
}
return type;
}