private void setupBuiltinDatatypeHierarchy()

in xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaCollection.java [387:437]


    private void setupBuiltinDatatypeHierarchy(XmlSchema xsd) {

        setDerivationByRestriction(xsd, Constants.XSD_ANYSIMPLETYPE, Constants.XSD_ANYTYPE);
        setDerivationByRestriction(xsd, Constants.XSD_DURATION, Constants.XSD_ANYSIMPLETYPE,  new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_DATETIME, Constants.XSD_ANYSIMPLETYPE,  new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_TIME, Constants.XSD_ANYSIMPLETYPE,      new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_DATE, Constants.XSD_ANYSIMPLETYPE,      new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_YEARMONTH, Constants.XSD_ANYSIMPLETYPE, new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_YEAR, Constants.XSD_ANYSIMPLETYPE,      new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_MONTHDAY, Constants.XSD_ANYSIMPLETYPE,  new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_DAY, Constants.XSD_ANYSIMPLETYPE,       new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_MONTH, Constants.XSD_ANYSIMPLETYPE,     new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_BOOLEAN, Constants.XSD_ANYSIMPLETYPE,   new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_BASE64, Constants.XSD_ANYSIMPLETYPE,    new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_HEXBIN, Constants.XSD_ANYSIMPLETYPE,    new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_FLOAT, Constants.XSD_ANYSIMPLETYPE,     new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_DOUBLE, Constants.XSD_ANYSIMPLETYPE,    new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_ANYURI, Constants.XSD_ANYSIMPLETYPE,    new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_QNAME, Constants.XSD_ANYSIMPLETYPE,     new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_NOTATION, Constants.XSD_ANYSIMPLETYPE,  new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });
        setDerivationByRestriction(xsd, Constants.XSD_DECIMAL, Constants.XSD_ANYSIMPLETYPE,   new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", true) });

        setDerivationByRestriction(xsd, Constants.XSD_INTEGER, Constants.XSD_DECIMAL,                    new XmlSchemaFacet[] { new XmlSchemaFractionDigitsFacet(Integer.valueOf(0), true),                 new XmlSchemaPatternFacet("[\\-+]?[0-9]+", false)                     });
        setDerivationByRestriction(xsd, Constants.XSD_NONPOSITIVEINTEGER, Constants.XSD_INTEGER,         new XmlSchemaFacet[] { new XmlSchemaMaxInclusiveFacet(Integer.valueOf(0), false)         });
        setDerivationByRestriction(xsd, Constants.XSD_NEGATIVEINTEGER, Constants.XSD_NONPOSITIVEINTEGER, new XmlSchemaFacet[] { new XmlSchemaMaxInclusiveFacet(Integer.valueOf(-1), false)        });
        setDerivationByRestriction(xsd, Constants.XSD_LONG, Constants.XSD_INTEGER,                       new XmlSchemaFacet[] { new XmlSchemaMinInclusiveFacet(Long.valueOf(-9223372036854775808L), false), new XmlSchemaMaxInclusiveFacet(Long.valueOf(9223372036854775807L), false) });
        setDerivationByRestriction(xsd, Constants.XSD_INT, Constants.XSD_LONG,                           new XmlSchemaFacet[] { new XmlSchemaMinInclusiveFacet(Integer.valueOf(-2147483648), false),        new XmlSchemaMaxInclusiveFacet(2147483647, false)                     });
        setDerivationByRestriction(xsd, Constants.XSD_SHORT, Constants.XSD_INT,                          new XmlSchemaFacet[] { new XmlSchemaMinInclusiveFacet(Short.valueOf((short) -32768), false),       new XmlSchemaMaxInclusiveFacet(Short.valueOf((short) 32767), false)       });
        setDerivationByRestriction(xsd, Constants.XSD_BYTE, Constants.XSD_SHORT,                         new XmlSchemaFacet[] { new XmlSchemaMinInclusiveFacet(Byte.valueOf((byte) -128), false),           new XmlSchemaMaxInclusiveFacet(Byte.valueOf((byte) 127), false)           });
        setDerivationByRestriction(xsd, Constants.XSD_NONNEGATIVEINTEGER, Constants.XSD_INTEGER,         new XmlSchemaFacet[] { new XmlSchemaMinInclusiveFacet(Integer.valueOf(0), false)         });
        setDerivationByRestriction(xsd, Constants.XSD_POSITIVEINTEGER, Constants.XSD_NONNEGATIVEINTEGER, new XmlSchemaFacet[] { new XmlSchemaMinInclusiveFacet(Integer.valueOf(1), false)         });
        setDerivationByRestriction(xsd, Constants.XSD_UNSIGNEDLONG, Constants.XSD_NONNEGATIVEINTEGER,    new XmlSchemaFacet[] { new XmlSchemaMaxInclusiveFacet(new BigInteger("18446744073709551615"), false) });
        setDerivationByRestriction(xsd, Constants.XSD_UNSIGNEDINT, Constants.XSD_UNSIGNEDLONG,           new XmlSchemaFacet[] { new XmlSchemaMaxInclusiveFacet(Long.valueOf(4294967295L), false)  });
        setDerivationByRestriction(xsd, Constants.XSD_UNSIGNEDSHORT, Constants.XSD_UNSIGNEDINT,          new XmlSchemaFacet[] { new XmlSchemaMaxInclusiveFacet(Integer.valueOf(65535), false)     });
        setDerivationByRestriction(xsd, Constants.XSD_UNSIGNEDBYTE, Constants.XSD_UNSIGNEDSHORT,         new XmlSchemaFacet[] { new XmlSchemaMaxInclusiveFacet(Short.valueOf((short) 255), false) });

        setDerivationByRestriction(xsd, Constants.XSD_STRING, Constants.XSD_ANYSIMPLETYPE,    new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("preserve", false) });
        setDerivationByRestriction(xsd, Constants.XSD_NORMALIZEDSTRING, Constants.XSD_STRING, new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("replace", false) });
        setDerivationByRestriction(xsd, Constants.XSD_TOKEN, Constants.XSD_NORMALIZEDSTRING,  new XmlSchemaFacet[] { new XmlSchemaWhiteSpaceFacet("collapse", false) });
        setDerivationByRestriction(xsd, Constants.XSD_LANGUAGE, Constants.XSD_TOKEN,          new XmlSchemaFacet[] { new XmlSchemaPatternFacet("[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*", false) });
        setDerivationByRestriction(xsd, Constants.XSD_NMTOKEN, Constants.XSD_TOKEN,           new XmlSchemaFacet[] { new XmlSchemaPatternFacet("\\c+", false) });
        setDerivationByRestriction(xsd, Constants.XSD_NAME, Constants.XSD_NMTOKEN,            new XmlSchemaFacet[] { new XmlSchemaPatternFacet("\\i\\c*", false) });
        setDerivationByRestriction(xsd, Constants.XSD_NCNAME, Constants.XSD_TOKEN,            new XmlSchemaFacet[] { new XmlSchemaPatternFacet("[\\i-[:]][\\c-[:]]*", false) });
        setDerivationByRestriction(xsd, Constants.XSD_ID, Constants.XSD_NCNAME);
        setDerivationByRestriction(xsd, Constants.XSD_IDREF, Constants.XSD_NCNAME);
        setDerivationByRestriction(xsd, Constants.XSD_ENTITY, Constants.XSD_NCNAME);

        setDerivationByList(xsd, Constants.XSD_NMTOKENS, Constants.XSD_NMTOKEN);
        setDerivationByList(xsd, Constants.XSD_IDREFS, Constants.XSD_IDREF);
        setDerivationByList(xsd, Constants.XSD_ENTITIES, Constants.XSD_ENTITY);
    }