//Now that we have the schema, lets build the types for the schema
XSNamedMap xsnamedmap = xsmodel.getComponents(XSConstants.TYPE_DEFINITION);
int len = xsnamedmap != null ? xsnamedmap.getLength() : 0;
for (int i = 0; i < len; i++)
{
XSObject type = xsnamedmap.item(i);
if (type instanceof XSComplexTypeDefinition)
{
XSComplexTypeDefinition ctype = (XSComplexTypeDefinition)type;
//Ignore xsd:anyType
String nsuri = type.getNamespace();
String tname = type.getName();
if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
xsdJava.createJavaFile(ctype, dirloc, packageName, xsmodel);
}
else if (type instanceof XSSimpleTypeDefinition)
{
XSSimpleTypeDefinition stype = (XSSimpleTypeDefinition)type;
//Ignore xsd:anyType
String nsuri = type.getNamespace();
String tname = type.getName();
if (Constants.NS_SCHEMA_XSD.equals(nsuri) && "anyType".equals(tname)) continue;
xsdJava.createJavaFile(stype, dirloc, packageName, xsmodel);
}
}