typeNode.setProperty(XsdLexicon.NAMESPACE, type.getTargetNamespace());
if (!isAnonymous) {
typeNode.setProperty(XsdLexicon.NC_NAME, type.getName());
registerForSymbolSpace(TYPE_DEFINITIONS, type.getTargetNamespace(), type.getName(), typeNode.getIdentifier());
}
XSDTypeDefinition baseType = type.getBaseType();
if (baseType == type) {
// The base type is the anytype ...
baseType = type.getSchema()
.getSchemaForSchema()
.resolveComplexTypeDefinition("http://www.w3.org/2001/XMLSchema", "anyType");
}
if (baseType != null) {
typeNode.setProperty(XsdLexicon.BASE_TYPE_NAME, baseType.getName());
typeNode.setProperty(XsdLexicon.BASE_TYPE_NAMESPACE, baseType.getTargetNamespace());
}
typeNode.setProperty(XsdLexicon.ABSTRACT, type.isAbstract());
typeNode.setProperty(XsdLexicon.MIXED, type.isMixed());
@SuppressWarnings( "unchecked" )