# com.bea.xml
SchemaType Interface

public interface SchemaType
extends `SchemaComponent`

Represents a schema type.

SchemaType is the metadata "type" class for `XmlObject```, and it plays the analogous role for `XmlObject``` that `Class``` plays for `Object```.

Every XML Bean class corresponds to a singleton SchemaType object obtainable by ClassName.type (e.g., `XmlNonPositiveInteger.type```), and every XML Bean instance has an actual SchemaType, obtainable by `XmlObject.schemaType()```. The ClassName.type and schemaType() mechanisms are analogous to the ordinary Java ClassName.class and obj.getClass() mechanisms.

All schema types are represented by a SchemaType, this includes all types regardless of whether they are built-in or user-defined, compiled or uncompiled, simple or complex.

In addition, a compiled XML Bean type system includes special "document" schema types each representing a document containing nothing but a single element for each global element, and special "attribute" schema types each representing a fragment containing nothing but a single global attribute for global attribute.

Do not confuse Schema Types with other types of Schema Components such as `SchemaGlobalElement```, `SchemaGlobalAttribute```, `SchemaModelGroup```, or `SchemaAttributeGroup```. SchemaType represents a Type component, not any of the other kinds of components. There are different kinds of metadata objects for the different Schema components.

The space of SchemaTypes is divided as follows:

- First, there is the universal base type and the universal subtype. These are `XmlObject.type``` (corresponding to xs:anyType) and `XmlBeans.NO_TYPE```, respectively. The first type is a base type of all other types. The other type indicates the absence of type information and, at least in set-theoretic terms, is a subtype of all other types.
- There is another universal base type that is the base type for all simple types. This is the `XmlAnySimpleType.type```, corresponding to xs:anySimpleType. Only XmlObject.type and XmlAnySimpleType.type return `true` for `SchemaType.isURType()```, and only XmlBeans.NO_TYPE returns `true` for `SchemaType.isNoType()```.
- The two "special" kinds of types that are generated that do not formally exist in the actual Schema specification are document types and global attribute types (corresponding to documents that contain a global element, or fragments that contain a global attribute). They can be detected using `SchemaType.isDocumentType()``` and `SchemaType.isAttributeType()```. Other than their anonymity (lack of a type name) and their appearance only at the root of an instance, they are otherwise just like ordinary complex types.
- Simple types can be detected using `SchemaType.isSimpleType()```. Complex types are consdered to be all the types that are not simple.
- Simple types are divided into three varieties: atomic types, list types, and union types. Which variety of simple type you have can be discoverd using `SchemaType.getSimpleVariety()```. It will return either `SchemaType.ATOMIC```, `SchemaType.LIST```, or `SchemaType.UNION```.
- An `SchemaType.ATOMIC``` simple type is always based on one of the 20 built-in primitive schema types. You can determine the underlying primitive type for an atomic simple type by calling `SchemaType.getPrimitiveType()```. An atomic type may add facet restrictions on top of the primitive type, and these facets can be explored using `SchemaType.getFacet(int)```, `SchemaType.getWhiteSpaceRule()```, `SchemaType.matchPatternFacet(String)```, `SchemaType.getEnumerationValues()```, and related methods.
- A `SchemaType.LIST``` simple type is always based on another non-list simple type. The underlying list item type can be obtained by using `SchemaType.getListItemType()```.
- A `SchemaType.UNION``` simple type is always composed out of a number of other simple types. The direct members of the union can be obtained by `SchemaType.getUnionMemberTypes()```. When unions consist of other unions, it is useful to know useful to know the "leaves of the union tree", so the set of non-union types making up the union can be obtained by `SchemaType.getUnionConstituentTypes()```. The closure of the entire "union tree" is `SchemaType.getUnionSubTypes()``` (this includes the type itself). For simple unions that do not consist of other unions, all three of these sets are the same.
- Complex types have nested structure. They are divided into four content types: empty content, simple content, element-only content, and mixed content. All kinds of complex types may have attributes. The content type for a complex type can be dermined using `SchemaType.getContentType()```. This will return `SchemaType.EMPTY_CONTENT```, `SchemaType.SIMPLE_CONTENT```, `SchemaType.ELEMENT_CONTENT```, or `SchemaType.MIXED_CONTENT```.
- If a complex type has `SchemaType.EMPTY_CONTENT```, the content model will be null.
- If a complex type has `SchemaType.SIMPLE_CONTENT```, then it will extend the simple type that describes the content. In addition, the type may impose additional simple type facet restrictions; these can be determined in the same way they are for a simple type.
- If a complex type has `SchemaType.ELEMENT_CONTENT``` or `SchemaType.MIXED_CONTENT```, then the detailed content model can be determined by examining the particle tree (which may be null for MIXED_CONTENT). The particle tree can be obtained via `SchemaType.getContentModel()```.
- When working with a complex type, most users will find it sufficient to discover the summarized shape of the content model and attribute model using `SchemaType.getElementProperties()```, `SchemaType.getAttributeProperties()```, and related methods rather than examining the particle tree and attribute model directly.

Related Topics

``SchemaTypeLoader``
``XmlObject.schemaType()``
``SimpleValue.instanceType()``

All Superinterfaces
  `SchemaComponent`

## Field Summary

`public static final int` | `ATOMIC` Atomic type.
`public static final int` | `BTC_ANY_SIMPLE` xs:anySimpleType, aka `XmlAnySimpleType.type```
`public static final int` | `BTC_ANY_TYPE` xs:anyType, aka `XmlObject.type```
`public static final int` | `BTC_ANY_URI` xs:anyURI, aka `XmlAnyURI.type```
`public static final int` | `BTC_BASE_64_BINARY` xs:base64Binary, aka `XmlBase64Binary.type```
`public static final int` | `BTC_BOOLEAN` xs:boolean, aka `XmlBoolean.type```
`public static final int` | `BTC_BYTE` xs:byte, aka `XmlByte.type```
`public static final int` | `BTC_DATE` xs:date, aka `XmlDate.type```
`public static final int` | `BTC_DATE_TIME` xs:dateTime, aka `XmlDateTime.type```
`public static final int` | `BTC_DECIMAL` xs:decimal, aka `XmlDecimal.type```
`public static final int` | `BTC_DOUBLE` xs:double, aka `XmlDouble.type```
`public static final int` | `BTC_DURATION` xs:duration, aka `XmlDuration.type```
`public static final int` | `BTC_ENTITIES` xs:ENTITIES, aka `XmlENTITIES.type```
`public static final int` | `BTC_ENTITY` xs:ENTITY, aka `XmlENTITY.type```
`public static final int` | `BTC_FIRST_PRIMITIVE` The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive
`public static final int` | `BTC_FLOAT` xs:float, aka `XmlFloat.type```
`public static final int` | `BTC_G_DAY` xs:gDay, aka `XmlGDay.type```
`public static final int` | `BTC_G_MONTH` xs:gMonth, aka `XmlGMonth.type```
`public static final int` | `BTC_G_MONTH_DAY` xs:gMonthDay, aka `XmlGMonthDay.type```
`public static final int` | `BTC_G_YEAR` xs:gYear, aka `XmlGYear.type```
`public static final int` | `BTC_G_YEAR_MONTH` xs:gYearMonth, aka `XmlGYearMonth.type```
`public static final int` | `BTC_HEX_BINARY` xs:hexBinary, aka `XmlBase64Binary.type```
`public static final int` | `BTC_ID` xs:ID, aka `XmlID.type```
`public static final int` | `BTC_IDREF` xs:IDREF, aka `XmlIDREF.type```
`public static final int` | `BTC_IDREFS` xs:IDREFS, aka `XmlIDREFS.type```
`public static final int` | `BTC_INT` xs:int, aka `XmlInt.type```
`public static final int` | `BTC_INTEGER` xs:integer, aka `XmlInteger.type```
`public static final int` | `BTC_LANGUAGE` xs:language, aka `XmlLanguage.type```
`public static final int` | `BTC_LAST_BUILTIN` int
`public static final int` | `BTC_LAST_PRIMITIVE` The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive
`public static final int` | `BTC_LONG` xs:long, aka `XmlLong.type```
`public static final int` | `BTC_NAME` xs:Name, aka `XmlName.type```
`public static final int` | `BTC_NCNAME` xs:NCName, aka `XmlNCName.type```
`public static final int` | `BTC_NEGATIVE_INTEGER` xs:NegativeInteger, aka `XmlNegativeInteger.type```
`public static final int` | `BTC_NMTOKEN` xs:NMTOKEN, aka `XmlNMTOKEN.type```
`public static final int` | `BTC_NMTOKENS` xs:NMTOKENS, aka `XmlNMTOKENS.type```
`public static final int` | `BTC_NON_NEGATIVE_INTEGER` xs:nonNegativeInteger, aka `XmlNonNegativeInteger.type```
`public static final int` | `BTC_NON_POSITIVE_INTEGER` xs:nonPositiveInteger, aka `XmlNonPositiveInteger.type```
`public static final int` | `BTC_NORMALIZED_STRING` xs:normalizedString, aka `XmlNormalizedString.type```
`public static final int` | `BTC_NOT_BUILTIN` Not a builtin type
`public static final int` | `BTC_NOTATION` xs:NOTATION, aka `XmlNOTATION.type```
`public static final int` | `BTC_POSITIVE_INTEGER` xs:positiveInteger, aka `XmlPositiveInteger.type```
`public static final int` | `BTC_QNAME` xs:QName, aka `XmlQName.type```
`public static final int` | `BTC_SHORT` xs:short, aka `XmlShort.type```
`public static final int` | `BTC_STRING` xs:string, aka `XmlString.type```
`public static final int` | `BTC_TIME` xs:time, aka `XmlTime.type```
`public static final int` | `BTC_TOKEN` xs:token, aka `XmlToken.type```
`public static final int` | `BTC_UNSIGNED_BYTE` xs:unsignedByte, aka `XmlUnsignedByte.type```
`public static final int` | `BTC_UNSIGNED_INT` xs:unsignedInt, aka `XmlUnsignedInt.type```
`public static final int` | `BTC_UNSIGNED_LONG` xs:unsignedLong, aka `XmlUnsignedLong.type```
`public static final int` | `BTC_UNSIGNED_SHORT` xs:unsignedShort, aka `XmlUnsignedShort.type```
`public static final int` | `DT_EXTENSION` Derived by extension.
`public static final int` | `DT_NOT_DERIVED` Not derived.
`public static final int` | `DT_RESTRICTION` Derived by restriction.
`public static final int` | `ELEMENT_CONTENT` Element-only content.
`public static final int` | `EMPTY_CONTENT` Empty content.
`public static final int` | `FACET_ENUMERATION` xs:enumeration facet - use `SchemaType.getEnumerationValues()``` instead
`public static final int` | `FACET_FRACTION_DIGITS` xs:fractionDigits facet
`public static final int` | `FACET_LENGTH` xs:length facet
`public static final int` | `FACET_MAX_EXCLUSIVE` xs:maxExclusive facet
`public static final int` | `FACET_MAX_INCLUSIVE` xs:maxInclusive facet
`public static final int` | `FACET_MAX_LENGTH` xs:maxLength facet
`public static final int` | `FACET_MIN_EXCLUSIVE` xs:minExclusive facet
`public static final int` | `FACET_MIN_INCLUSIVE` xs:minInclusive facet
`public static final int` | `FACET_MIN_LENGTH` xs:minLength facet
`public static final int` | `FACET_PATTERN` xs:pattern facet - use `SchemaType.matchPatternFacet(String)``` instead
`public static final int` | `FACET_TOTAL_DIGITS` xs:totalDigits facet
`public static final int` | `FACET_WHITE_SPACE` xs:whiteSpace facet - use `SchemaType.getWhiteSpaceRule()``` instead
`public static final int` | `LAST_BASIC_FACET` int
`public static final int` | `LAST_FACET` The last ordinary facet code
`public static final int` | `LAST_PROPERTY` The last property code
`public static final int` | `LIST` Simple list type.
`public static final int` | `MIXED_CONTENT` Mixed content.
`public static final int` | `NOT_COMPLEX_TYPE` Not a complex type.
`public static final int` | `NOT_DECIMAL` Not a decimal restriction.
`public static final int` | `NOT_SIMPLE` Not a simple type or simple content.
`public static final int` | `PARTIAL_ORDER` Partially ordered.
`public static final int` | `PROPERTY_BOUNDED` int
`public static final int` | `PROPERTY_CARDINALITY` int
`public static final int` | `PROPERTY_NUMERIC` int
`public static final int` | `PROPERTY_ORDERED` int
`public static final int` | `SIMPLE_CONTENT` Simple content.
`public static final int` | `SIZE_BIG_DECIMAL` Fits in a `BigDecimal```.
`public static final int` | `SIZE_BIG_INTEGER` Fits in a `BigInteger```.
`public static final int` | `SIZE_BYTE` Fits in a byte.
`public static final int` | `SIZE_INT` Fits in an int.
`public static final int` | `SIZE_LONG` Fits in a long.
`public static final int` | `SIZE_SHORT` Fits in a short.
`public static final int` | `TOTAL_ORDER` Totally ordered.
`public static final int` | `UNION` Union type.
`public static final int` | `UNORDERED` Unordered.
`public static final int` | `WS_COLLAPSE` Whitespace collapsed and trimmed.
`public static final int` | `WS_PRESERVE` Whitespace preserved.
`public static final int` | `WS_REPLACE` Whitespace replaced by ordinary space.
`public static final int` | `WS_UNSPECIFIED` Whitespace rule unspecified.

Fields from interface com.bea.xml`.`SchemaComponent``
``ATTRIBUTE`, `ATTRIBUTE_GROUP`, `ELEMENT`, `IDENTITY_CONSTRAINT`, `MODEL_GROUP`, `NOTATION`, `TYPE``

## Method Summary

`public boolean` | `blockExtension`() True if extensions of this type cannot be substituted for this type
`public boolean` | `blockRestriction`() True if restrictions of this type cannot be substituted for this type
`public `SchemaStringEnumEntry`` | `enumEntryForString`(`String` s) Returns the string enum entry corresponding to the given enumerated string, or null if there is no match or this type is not a string enumeration.
`public `StringEnumAbstractBase`` | `enumForInt`(int i) Returns the string enum value corresponding to the given enumerated string, or null if there is no match or this type is not a string enumeration.
`public `StringEnumAbstractBase`` | `enumForString`(`String` s) Returns the string enum value corresponding to the given enumerated string, or null if there is no match or this type is not a string enumeration.
`public boolean` | `finalExtension`() True if other types cannot extend this type (only for complex types)
`public boolean` | `finalList`() True if list derivation of this type is prohibited (only for simple types)
`public boolean` | `finalRestriction`() True if other types cannot restrict this type
`public boolean` | `finalUnion`() True if union derivation of this type is prohibited (only for simple types)
`public `SchemaType`[]` | `getAnonymousTypes`() The array of inner (anonymous) types defined within this type.
`public int` | `getAnonymousUnionMemberOrdinal`() For anonymous types defined inside a union only: gets the integer indicating the declaration order of this type within the outer union type, or zero if this is not applicable.
`public `SchemaAttributeModel`` | `getAttributeModel`() Returns the attribute model for this complex type (with simple or complex content).
`public `SchemaProperty`[]` | `getAttributeProperties`() Returns all the SchemaProperties corresponding to attributes.
`public `SchemaProperty`` | `getAttributeProperty`(`QName` attrName) Returns a SchemaProperty corresponding to an attribute within this complex type by looking up the attribute name.
`public `SchemaType`` | `getAttributeType`(`QName` eltName, `SchemaTypeLoader` wildcardTypeLoader) Returns the type of an attribute based on the attribute name and the type system within which (wildcard) names are resolved.
`public `QName`` | `getAttributeTypeAttributeName`() Returns the attribute qname if this is a attribute type, or null otherwise.
`public `SchemaType`` | `getBaseEnumType`() If this is a string enumeration, returns the most basic base schema type that this enuemration is based on.
`public `SchemaType`` | `getBaseType`() Returns base restriction or extension type.
`public int` | `getBuiltinTypeCode`() Returns an integer for builtin types that can be used for quick comparison.
`public `SchemaType`` | `getCommonBaseType`(`SchemaType` type) Returns common base type with the given type.
`public `SchemaField`` | `getContainerField`() The parent schema element.
`public `SchemaParticle`` | `getContentModel`() Returns the complex content model for this complex type (with complex content).
`public int` | `getContentType`() Returns `SchemaType.EMPTY_CONTENT```, `SchemaType.SIMPLE_CONTENT```, `SchemaType.ELEMENT_CONTENT```, or `SchemaType.MIXED_CONTENT``` for complex types.
`public int` | `getDecimalSize`() For atomic numeric restrictions of decimal only: the numeric size category.
`public int` | `getDerivationType`() Returns an integer for the derivation type, either `SchemaType.DT_EXTENSION```, `SchemaType.DT_RESTRICTION```, `SchemaType.DT_NOT_DERIVED```.
`public `SchemaProperty`[]` | `getDerivedProperties`() Returns the SchemaProperties defined by this complex type, exclusive of the base type (if any).
`public `QName`` | `getDocumentElementName`() Returns the document element name if this is a document type, or null otherwise.
`public `SchemaProperty`[]` | `getElementProperties`() Returns all the SchemaProperties corresponding to elements.
`public `SchemaProperty`` | `getElementProperty`(`QName` eltName) Returns a SchemaProperty corresponding to an element within this complex type by looking up the element name.
`public `SchemaTypeElementSequencer`` | `getElementSequencer`() Returns a `SchemaTypeElementSequencer``` object, which can then be used to validate complex content inside this element.
`public `SchemaType`` | `getElementType`(`QName` eltName, `QName` xsiType, `SchemaTypeLoader` wildcardTypeLoader) Returns the type of a child element based on the element name and an xsi:type attribute (and the type system within which names are resolved).
`public `XmlAnySimpleType`[]` | `getEnumerationValues`() Returns the array of valid objects from the enumeration facet, null if no enumeration defined.
`public `Class`` | `getEnumJavaClass`() The Java class corresponding to the enumeration type for this schema type, if applicable (or null if not an enumeration).
`public `XmlAnySimpleType`` | `getFacet`(int facetCode) Returns the value of the given facet, or null if none is set.
`public `String`` | `getFullJavaImplName`() The fully-qualified Java type name of the implementation class.
`public `String`` | `getFullJavaName`() The fully-qualified Java type name of the class.
`public `Class`` | `getJavaClass`() The Java class corresponding to this schema type.
`public `SchemaType`` | `getListItemType`() For list types only: get the item type.
`public `QName`` | `getName`() The name used to describe the type in the schema.
`public `SchemaType`` | `getOuterType`() The outer schema type.
`public `String`[]` | `getPatterns`() True
`public `SchemaType`` | `getPrimitiveType`() For atomic types only: get the primitive type underlying this one.
`public `SchemaProperty`[]` | `getProperties`() Returns all the SchemaProperties within this complex type, elements followed by attributes.
`public `SchemaType.Ref`` | `getRef`() Retruns a SchemaType.Ref pointing to this schema type itself.
`public `String`` | `getShortJavaImplName`() The short unqualfiied Java name for the implementation class.
`public `String`` | `getShortJavaName`() The short unqualfiied Java name for the class.
`public int` | `getSimpleVariety`() Returns whether the simple type is ATOMIC, UNION, or LIST.
`public `String`` | `getSourceName`() Returns the filename for the XSD file from which this type was loaded.
`public `SchemaStringEnumEntry`[]` | `getStringEnumEntries`() Returns the array of SchemaStringEnumEntries for this type: this array includes information about the java constant names used for each string enum entry.
`public `SchemaTypeSystem`` | `getTypeSystem`() Returns the SchemaTypeLoader in which this type was defined.
`public `SchemaType`` | `getUnionCommonBaseType`() For union types only: get the most specific common base type of the constituent member types.
`public `SchemaType`[]` | `getUnionConstituentTypes`() For union types only: get the constituent member types.
`public `SchemaType`[]` | `getUnionMemberTypes`() For union types only: get the shallow member types.
`public `SchemaType`[]` | `getUnionSubTypes`() For union types only: gets the full tree of member types.
`public int` | `getWhiteSpaceRule`() For nonunion simple types: get the whitespace rule.
`public boolean` | `hasAllContent`() True if the complex content model for this complex type is an "all" group.
`public boolean` | `hasAttributeWildcards`() True if this type permits wildcard attributes.
`public boolean` | `hasElementWildcards`() True if this type permits element wildcards.
`public boolean` | `hasPatternFacet`() True if there are regex pattern facents
`public boolean` | `hasStringEnumValues`() True if this is a string enum where an integer is assigned to each enumerated value.
`public boolean` | `isAbstract`() True if this type cannot be used directly in instances
`public boolean` | `isAnonymousType`() True if the Xsd type is anonymous (i.e., not top-level).
`public boolean` | `isAssignableFrom`(`SchemaType` type) True if the specified type derives from this type (or if it is the same type).
`public boolean` | `isAttributeType`() True if this is a attribute type.
`public boolean` | `isBounded`() True if bounded.
`public boolean` | `isBuiltinType`() True for any of the 40+ built-in types.
`public boolean` | `isCompiled`() True if this schema type was compiled to have a corresponding Java class.
`public boolean` | `isDocumentType`() True if this is a document type.
`public boolean` | `isFacetFixed`(int facetCode) True if the given facet is fixed.
`public boolean` | `isFinite`() True if finite.
`public boolean` | `isNoType`() True for the type object that represents a the absence of a determined type.
`public boolean` | `isNumeric`() True if numeric.
`public boolean` | `isOrderSensitive`() True if particles have same defaults, nillability, etc, that are invariant when order changes.
`public boolean` | `isPrimitiveType`() True for any of the 20 primitive types (plus anySimpleType)
`public boolean` | `isSimpleType`() True for the anySimpleType and any restrictions/unions/lists.
`public boolean` | `isSkippedAnonymousType`() True if this anonymous type has no corresponding Java type.
`public boolean` | `isURType`() True for anyType and anySimpleType.
`public boolean` | `isValidSubstitution`(`QName` name) For document types, true if the given name can be substituted for the document element name.
`public boolean` | `matchPatternFacet`(`String` s) True if the given string matches the pattern facets.
`public `XmlAnySimpleType`` | `newValue`(`Object` v) Creates an immutable simple type value that does not reside in a tree.
`public int` | `ordered`() True if ordered.

Methods from interface `com.bea.xml.`SchemaComponent``
``getComponentRef`, `getComponentType`,`

## Field Detail

### ATOMIC

    public static final int ATOMIC

  Atomic type. See `SchemaType.getSimpleVariety()```

### BTC_ANY_SIMPLE

    public static final int BTC_ANY_SIMPLE

  xs:anySimpleType, aka `XmlAnySimpleType.type```

### BTC_ANY_TYPE

    public static final int BTC_ANY_TYPE

  xs:anyType, aka `XmlObject.type```

### BTC_ANY_URI

    public static final int BTC_ANY_URI

  xs:anyURI, aka `XmlAnyURI.type```

### BTC_BASE_64_BINARY

    public static final int BTC_BASE_64_BINARY

  xs:base64Binary, aka `XmlBase64Binary.type```

### BTC_BOOLEAN

    public static final int BTC_BOOLEAN

  xs:boolean, aka `XmlBoolean.type```

### BTC_BYTE

    public static final int BTC_BYTE

  xs:byte, aka `XmlByte.type```

### BTC_DATE

    public static final int BTC_DATE

  xs:date, aka `XmlDate.type```

### BTC_DATE_TIME

    public static final int BTC_DATE_TIME

  xs:dateTime, aka `XmlDateTime.type```

### BTC_DECIMAL

    public static final int BTC_DECIMAL

  xs:decimal, aka `XmlDecimal.type```

### BTC_DOUBLE

    public static final int BTC_DOUBLE

  xs:double, aka `XmlDouble.type```

### BTC_DURATION

    public static final int BTC_DURATION

  xs:duration, aka `XmlDuration.type```

### BTC_ENTITIES

    public static final int BTC_ENTITIES

  xs:ENTITIES, aka `XmlENTITIES.type```

### BTC_ENTITY

    public static final int BTC_ENTITY

  xs:ENTITY, aka `XmlENTITY.type```

### BTC_FIRST_PRIMITIVE

    public static final int BTC_FIRST_PRIMITIVE

  The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive

### BTC_FLOAT

    public static final int BTC_FLOAT

  xs:float, aka `XmlFloat.type```

### BTC_G_DAY

    public static final int BTC_G_DAY

  xs:gDay, aka `XmlGDay.type```

### BTC_G_MONTH

    public static final int BTC_G_MONTH

  xs:gMonth, aka `XmlGMonth.type```

### BTC_G_MONTH_DAY

    public static final int BTC_G_MONTH_DAY

  xs:gMonthDay, aka `XmlGMonthDay.type```

### BTC_G_YEAR

    public static final int BTC_G_YEAR

  xs:gYear, aka `XmlGYear.type```

### BTC_G_YEAR_MONTH

    public static final int BTC_G_YEAR_MONTH

  xs:gYearMonth, aka `XmlGYearMonth.type```

### BTC_HEX_BINARY

    public static final int BTC_HEX_BINARY

  xs:hexBinary, aka `XmlBase64Binary.type```

### BTC_ID

    public static final int BTC_ID

  xs:ID, aka `XmlID.type```

### BTC_IDREF

    public static final int BTC_IDREF

  xs:IDREF, aka `XmlIDREF.type```

### BTC_IDREFS

    public static final int BTC_IDREFS

  xs:IDREFS, aka `XmlIDREFS.type```

### BTC_INT

    public static final int BTC_INT

  xs:int, aka `XmlInt.type```

### BTC_INTEGER

    public static final int BTC_INTEGER

  xs:integer, aka `XmlInteger.type```

### BTC_LANGUAGE

    public static final int BTC_LANGUAGE

  xs:language, aka `XmlLanguage.type```

### BTC_LAST_BUILTIN

    public static final int BTC_LAST_BUILTIN

### BTC_LAST_PRIMITIVE

    public static final int BTC_LAST_PRIMITIVE

  The primitive types have codes between BTC_FIRST_PRIMITIVE and BTC_LAST_PRIMITIVE inclusive

### BTC_LONG

    public static final int BTC_LONG

  xs:long, aka `XmlLong.type```

### BTC_NAME

    public static final int BTC_NAME

  xs:Name, aka `XmlName.type```

### BTC_NCNAME

    public static final int BTC_NCNAME

  xs:NCName, aka `XmlNCName.type```

### BTC_NEGATIVE_INTEGER

    public static final int BTC_NEGATIVE_INTEGER

  xs:NegativeInteger, aka `XmlNegativeInteger.type```

### BTC_NMTOKEN

    public static final int BTC_NMTOKEN

  xs:NMTOKEN, aka `XmlNMTOKEN.type```

### BTC_NMTOKENS

    public static final int BTC_NMTOKENS

  xs:NMTOKENS, aka `XmlNMTOKENS.type```

### BTC_NON_NEGATIVE_INTEGER

    public static final int BTC_NON_NEGATIVE_INTEGER

  xs:nonNegativeInteger, aka `XmlNonNegativeInteger.type```

### BTC_NON_POSITIVE_INTEGER

    public static final int BTC_NON_POSITIVE_INTEGER

  xs:nonPositiveInteger, aka `XmlNonPositiveInteger.type```

### BTC_NORMALIZED_STRING

    public static final int BTC_NORMALIZED_STRING

  xs:normalizedString, aka `XmlNormalizedString.type```

### BTC_NOT_BUILTIN

    public static final int BTC_NOT_BUILTIN

  Not a builtin type

### BTC_NOTATION

    public static final int BTC_NOTATION

  xs:NOTATION, aka `XmlNOTATION.type```

### BTC_POSITIVE_INTEGER

    public static final int BTC_POSITIVE_INTEGER

  xs:positiveInteger, aka `XmlPositiveInteger.type```

### BTC_QNAME

    public static final int BTC_QNAME

  xs:QName, aka `XmlQName.type```

### BTC_SHORT

    public static final int BTC_SHORT

  xs:short, aka `XmlShort.type```

### BTC_STRING

    public static final int BTC_STRING

  xs:string, aka `XmlString.type```

### BTC_TIME

    public static final int BTC_TIME

  xs:time, aka `XmlTime.type```

### BTC_TOKEN

    public static final int BTC_TOKEN

  xs:token, aka `XmlToken.type```

### BTC_UNSIGNED_BYTE

    public static final int BTC_UNSIGNED_BYTE

  xs:unsignedByte, aka `XmlUnsignedByte.type```

### BTC_UNSIGNED_INT

    public static final int BTC_UNSIGNED_INT

  xs:unsignedInt, aka `XmlUnsignedInt.type```

### BTC_UNSIGNED_LONG

    public static final int BTC_UNSIGNED_LONG

  xs:unsignedLong, aka `XmlUnsignedLong.type```

### BTC_UNSIGNED_SHORT

    public static final int BTC_UNSIGNED_SHORT

  xs:unsignedShort, aka `XmlUnsignedShort.type```

### DT_EXTENSION

    public static final int DT_EXTENSION

  Derived by extension. See `SchemaType.getDerivationType()```.

### DT_NOT_DERIVED

    public static final int DT_NOT_DERIVED

  Not derived. True for XmlObject.type only. See `SchemaType.getDerivationType()```.

### DT_RESTRICTION

    public static final int DT_RESTRICTION

  Derived by restriction. See `SchemaType.getDerivationType()```.

### ELEMENT_CONTENT

    public static final int ELEMENT_CONTENT

  Element-only content. See `SchemaType.getContentType()```.

### EMPTY_CONTENT

    public static final int EMPTY_CONTENT

  Empty content. See `SchemaType.getContentType()```.

### FACET_ENUMERATION

    public static final int FACET_ENUMERATION

  xs:enumeration facet - use `SchemaType.getEnumerationValues()``` instead

### FACET_FRACTION_DIGITS

    public static final int FACET_FRACTION_DIGITS

  xs:fractionDigits facet

### FACET_LENGTH

    public static final int FACET_LENGTH

  xs:length facet

### FACET_MAX_EXCLUSIVE

    public static final int FACET_MAX_EXCLUSIVE

  xs:maxExclusive facet

### FACET_MAX_INCLUSIVE

    public static final int FACET_MAX_INCLUSIVE

  xs:maxInclusive facet

### FACET_MAX_LENGTH

    public static final int FACET_MAX_LENGTH

  xs:maxLength facet

### FACET_MIN_EXCLUSIVE

    public static final int FACET_MIN_EXCLUSIVE

  xs:minExclusive facet

### FACET_MIN_INCLUSIVE

    public static final int FACET_MIN_INCLUSIVE

  xs:minInclusive facet

### FACET_MIN_LENGTH

    public static final int FACET_MIN_LENGTH

  xs:minLength facet

### FACET_PATTERN

    public static final int FACET_PATTERN

  xs:pattern facet - use `SchemaType.matchPatternFacet(String)``` instead

### FACET_TOTAL_DIGITS

    public static final int FACET_TOTAL_DIGITS

  xs:totalDigits facet

### FACET_WHITE_SPACE

    public static final int FACET_WHITE_SPACE

  xs:whiteSpace facet - use `SchemaType.getWhiteSpaceRule()``` instead

### LAST_BASIC_FACET

    public static final int LAST_BASIC_FACET

### LAST_FACET

    public static final int LAST_FACET

  The last ordinary facet code

### LAST_PROPERTY

    public static final int LAST_PROPERTY

  The last property code

### LIST

    public static final int LIST

  Simple list type. See `SchemaType.getSimpleVariety()```

### MIXED_CONTENT

    public static final int MIXED_CONTENT

  Mixed content. See `SchemaType.getContentType()```.

### NOT_COMPLEX_TYPE

    public static final int NOT_COMPLEX_TYPE

  Not a complex type. See `SchemaType.getContentType()```.

### NOT_DECIMAL

    public static final int NOT_DECIMAL

  Not a decimal restriction. See `SchemaType.getDecimalSize()```.

### NOT_SIMPLE

    public static final int NOT_SIMPLE

  Not a simple type or simple content. See `SchemaType.getSimpleVariety()```.

### PARTIAL_ORDER

    public static final int PARTIAL_ORDER

  Partially ordered. See `SchemaType.ordered()```.

### PROPERTY_BOUNDED

    public static final int PROPERTY_BOUNDED

Related Topics

``SchemaType.isBounded()``

### PROPERTY_CARDINALITY

    public static final int PROPERTY_CARDINALITY

Related Topics

``SchemaType.isFinite()``

### PROPERTY_NUMERIC

    public static final int PROPERTY_NUMERIC

Related Topics

``SchemaType.isNumeric()``

### PROPERTY_ORDERED

    public static final int PROPERTY_ORDERED

Related Topics

``SchemaType.ordered()``

### SIMPLE_CONTENT

    public static final int SIMPLE_CONTENT

  Simple content. See `SchemaType.getContentType()```.

### SIZE_BIG_DECIMAL

    public static final int SIZE_BIG_DECIMAL

  Fits in a `BigDecimal```. See `SchemaType.getDecimalSize()```.

### SIZE_BIG_INTEGER

    public static final int SIZE_BIG_INTEGER

  Fits in a `BigInteger```. See `SchemaType.getDecimalSize()```.

### SIZE_BYTE

    public static final int SIZE_BYTE

  Fits in a byte. See `SchemaType.getDecimalSize()```.

### SIZE_INT

    public static final int SIZE_INT

  Fits in an int. See `SchemaType.getDecimalSize()```.

### SIZE_LONG

    public static final int SIZE_LONG

  Fits in a long. See `SchemaType.getDecimalSize()```.

### SIZE_SHORT

    public static final int SIZE_SHORT

  Fits in a short. See `SchemaType.getDecimalSize()```.

### TOTAL_ORDER

    public static final int TOTAL_ORDER

  Totally ordered. See `SchemaType.ordered()```.

### UNION

    public static final int UNION

  Union type. See `SchemaType.getSimpleVariety()```

### UNORDERED

    public static final int UNORDERED

  Unordered. See `SchemaType.ordered()```.

### WS_COLLAPSE

    public static final int WS_COLLAPSE

  Whitespace collapsed and trimmed. See `SchemaType.getWhiteSpaceRule()```.

### WS_PRESERVE

    public static final int WS_PRESERVE

  Whitespace preserved. See `SchemaType.getWhiteSpaceRule()```.

### WS_REPLACE

    public static final int WS_REPLACE

  Whitespace replaced by ordinary space. See `SchemaType.getWhiteSpaceRule()```.

### WS_UNSPECIFIED

    public static final int WS_UNSPECIFIED

  Whitespace rule unspecified. See `SchemaType.getWhiteSpaceRule()```.

## Method Detail

### blockExtension() Method

    public boolean blockExtension()

True if extensions of this type cannot be substituted for this type

### blockRestriction() Method

    public boolean blockRestriction()

True if restrictions of this type cannot be substituted for this type

### enumEntryForString(String) Method

    public SchemaStringEnumEntry enumEntryForString(String s)

Returns the string enum entry corresponding to the given enumerated string, or null if there is no match or this type is not a string enumeration.

### enumForInt(int) Method

    public StringEnumAbstractBase enumForInt(int i)

Returns the string enum value corresponding to the given enumerated string, or null if there is no match or this type is not a string enumeration.

### enumForString(String) Method

    public StringEnumAbstractBase enumForString(String s)

Returns the string enum value corresponding to the given enumerated string, or null if there is no match or this type is not a string enumeration.

### finalExtension() Method

    public boolean finalExtension()

True if other types cannot extend this type (only for complex types)

### finalList() Method

    public boolean finalList()

True if list derivation of this type is prohibited (only for simple types)

### finalRestriction() Method

    public boolean finalRestriction()

True if other types cannot restrict this type

### finalUnion() Method

    public boolean finalUnion()

True if union derivation of this type is prohibited (only for simple types)

### getAnonymousTypes() Method

    public SchemaType[] getAnonymousTypes()

The array of inner (anonymous) types defined within this type.

### getAnonymousUnionMemberOrdinal() Method

    public int getAnonymousUnionMemberOrdinal()

For anonymous types defined inside a union only: gets the integer indicating the declaration order of this type within the outer union type, or zero if this is not applicable. The first anonymous union member within a union type is numbered "1". Used to differentiate between different anonymous types.

### getAttributeModel() Method

    public SchemaAttributeModel getAttributeModel()

Returns the attribute model for this complex type (with simple or complex content).

### getAttributeProperties() Method

    public SchemaProperty[] getAttributeProperties()

Returns all the SchemaProperties corresponding to attributes.

### getAttributeProperty(QName) Method

    public SchemaProperty getAttributeProperty(QName attrName)

Returns a SchemaProperty corresponding to an attribute within this complex type by looking up the attribute name.

### getAttributeType(QName, SchemaTypeLoader) Method

    public SchemaType getAttributeType(QName eltName,
                                       SchemaTypeLoader wildcardTypeLoader)

Returns the type of an attribute based on the attribute name and the type system within which (wildcard) names are resolved.

### getAttributeTypeAttributeName() Method

    public QName getAttributeTypeAttributeName()

Returns the attribute qname if this is a attribute type, or null otherwise.

### getBaseEnumType() Method

    public SchemaType getBaseEnumType()

If this is a string enumeration, returns the most basic base schema type that this enuemration is based on. Otherwise returns null.

### getBaseType() Method

    public SchemaType getBaseType()

Returns base restriction or extension type. Unions and lists return the anySimpleType.

### getBuiltinTypeCode() Method

    public int getBuiltinTypeCode()

Returns an integer for builtin types that can be used for quick comparison.

### getCommonBaseType(SchemaType) Method

    public SchemaType getCommonBaseType(SchemaType type)

Returns common base type with the given type. The returned type is the most specific declared base type of both types.

### getContainerField() Method

    public SchemaField getContainerField()

The parent schema element. Null for top-level (named) types and document types.

### getContentModel() Method

    public SchemaParticle getContentModel()

Returns the complex content model for this complex type (with complex content).

### getContentType() Method

    public int getContentType()

Returns `SchemaType.EMPTY_CONTENT```, `SchemaType.SIMPLE_CONTENT```, `SchemaType.ELEMENT_CONTENT```, or `SchemaType.MIXED_CONTENT``` for complex types. For noncomplex types, returns `SchemaType.NOT_COMPLEX_TYPE```.

### getDecimalSize() Method

    public int getDecimalSize()

For atomic numeric restrictions of decimal only: the numeric size category. Takes into account min and max restrictions as well as totalDigits and fractionDigits facets.

Returns either `SchemaType.NOT_DECIMAL```, `SchemaType.SIZE_BYTE```, `SchemaType.SIZE_SHORT```, `SchemaType.SIZE_INT```, `SchemaType.SIZE_LONG```, `SchemaType.SIZE_BIG_INTEGER```, or `SchemaType.SIZE_BIG_DECIMAL```.

### getDerivationType() Method

    public int getDerivationType()

Returns an integer for the derivation type, either `SchemaType.DT_EXTENSION```, `SchemaType.DT_RESTRICTION```, `SchemaType.DT_NOT_DERIVED```.

### getDerivedProperties() Method

    public SchemaProperty[] getDerivedProperties()

Returns the SchemaProperties defined by this complex type, exclusive of the base type (if any).

### getDocumentElementName() Method

    public QName getDocumentElementName()

Returns the document element name if this is a document type, or null otherwise.

### getElementProperties() Method

    public SchemaProperty[] getElementProperties()

Returns all the SchemaProperties corresponding to elements.

### getElementProperty(QName) Method

    public SchemaProperty getElementProperty(QName eltName)

Returns a SchemaProperty corresponding to an element within this complex type by looking up the element name.

### getElementSequencer() Method

    public SchemaTypeElementSequencer getElementSequencer()

Returns a `SchemaTypeElementSequencer``` object, which can then be used to validate complex content inside this element. This is useful for example for trying out different names and see which one would be valid as a child of this element.

### getElementType(QName, QName, SchemaTypeLoader) Method

    public SchemaType getElementType(QName eltName,
                                     QName xsiType,
                                     SchemaTypeLoader wildcardTypeLoader)

Returns the type of a child element based on the element name and an xsi:type attribute (and the type system within which names are resolved).

### getEnumerationValues() Method

    public XmlAnySimpleType[] getEnumerationValues()

Returns the array of valid objects from the enumeration facet, null if no enumeration defined.

### getEnumJavaClass() Method

    public Class getEnumJavaClass()

The Java class corresponding to the enumeration type for this schema type, if applicable (or null if not an enumeration).

### getFacet(int) Method

    public XmlAnySimpleType getFacet(int facetCode)

Returns the value of the given facet, or null if none is set.

### getFullJavaImplName() Method

    public String getFullJavaImplName()

The fully-qualified Java type name of the implementation class.

### getFullJavaName() Method

    public String getFullJavaName()

The fully-qualified Java type name of the class.

### getJavaClass() Method

    public Class getJavaClass()

The Java class corresponding to this schema type.

### getListItemType() Method

    public SchemaType getListItemType()

For list types only: get the item type. This is the atomic or union type that is the type of every entry in the list.

Returns null if this type is not a list.

### getName() Method

    public QName getName()

The name used to describe the type in the schema. Null if the type is anonymous (nested), or if it is a document type.

### getOuterType() Method

    public SchemaType getOuterType()

The outer schema type. Null for top-level (named) types.

### getPatterns() Method

    public String[] getPatterns()

True

### getPrimitiveType() Method

    public SchemaType getPrimitiveType()

For atomic types only: get the primitive type underlying this one.

Returns null if this is not an atomic type.

### getProperties() Method

    public SchemaProperty[] getProperties()

Returns all the SchemaProperties within this complex type, elements followed by attributes.

### getRef() Method

    public SchemaType.Ref getRef()

Retruns a SchemaType.Ref pointing to this schema type itself.

### getShortJavaImplName() Method

    public String getShortJavaImplName()

The short unqualfiied Java name for the implementation class.

### getShortJavaName() Method

    public String getShortJavaName()

The short unqualfiied Java name for the class.

### getSimpleVariety() Method

    public int getSimpleVariety()

Returns whether the simple type is ATOMIC, UNION, or LIST. Returns `SchemaType.NOT_SIMPLE```, `SchemaType.ATOMIC```, `SchemaType.UNION```, or `SchemaType.LIST```.

### getSourceName() Method

    public String getSourceName()

Returns the filename for the XSD file from which this type was loaded. Intended for use when debugging.

### getStringEnumEntries() Method

    public SchemaStringEnumEntry[] getStringEnumEntries()

Returns the array of SchemaStringEnumEntries for this type: this array includes information about the java constant names used for each string enum entry.

### getTypeSystem() Method

    public SchemaTypeSystem getTypeSystem()

Returns the SchemaTypeLoader in which this type was defined. Complex types are defined and used in exactly one schema type system, but simple types are defined in one type system and can be used in any number of type systems. The most common case is the builtin types, which are defined in the builtin type system and used elsewhere.

### getUnionCommonBaseType() Method

    public SchemaType getUnionCommonBaseType()

For union types only: get the most specific common base type of the constituent member types. May return a UR type.

Returns null if this type is not a union.

### getUnionConstituentTypes() Method

    public SchemaType[] getUnionConstituentTypes()

For union types only: get the constituent member types. This returns only non-union types, so, for example, for unions of unions, this returns the flattened list of individual member types within the innermost unions.

Returns null if this type is not a union.

### getUnionMemberTypes() Method

    public SchemaType[] getUnionMemberTypes()

For union types only: get the shallow member types. This returns the declared member types of the union, so, for example if the type contains another union, the nested members of that union are NOT returned here.

Returns null if this type is not a union.

### getUnionSubTypes() Method

    public SchemaType[] getUnionSubTypes()

For union types only: gets the full tree of member types. This computes the closure of the set returned by getUnionMemberTypes(), so, for example, it returns all the types nested within unions of unions as well as the top-level members; the set also includes the type itself. If you are seeking only the basic non-union consituents, use getUnionConstituentTypes.

Returns null if this type is not a union.

### getWhiteSpaceRule() Method

    public int getWhiteSpaceRule()

For nonunion simple types: get the whitespace rule. This is either `SchemaType.WS_PRESERVE```, `SchemaType.WS_REPLACE```, or `SchemaType.WS_COLLAPSE```. Returns `SchemaType.WS_UNSPECIFIED``` for unions and complex types.

### hasAllContent() Method

    public boolean hasAllContent()

True if the complex content model for this complex type is an "all" group.

### hasAttributeWildcards() Method

    public boolean hasAttributeWildcards()

True if this type permits wildcard attributes. See the attribute model for more information about which wildcards are allowed.

### hasElementWildcards() Method

    public boolean hasElementWildcards()

True if this type permits element wildcards. See the content model for more information about which wildcards are allowed, and where.

### hasPatternFacet() Method

    public boolean hasPatternFacet()

True if there are regex pattern facents

### hasStringEnumValues() Method

    public boolean hasStringEnumValues()

True if this is a string enum where an integer is assigned to each enumerated value.

### isAbstract() Method

    public boolean isAbstract()

True if this type cannot be used directly in instances

### isAnonymousType() Method

    public boolean isAnonymousType()

True if the Xsd type is anonymous (i.e., not top-level).

### isAssignableFrom(SchemaType) Method

    public boolean isAssignableFrom(SchemaType type)

True if the specified type derives from this type (or if it is the same type). Note that XmlObject.type (the anyType) is assignable from all type, and the XmlBeans.noType (the absence of a type) is assignable to all types.

### isAttributeType() Method

    public boolean isAttributeType()

True if this is a attribute type.

Attribute types are generated for every global attribute. An attribute type is an unnamed complex type that contains exactly one attribute: we define these types, because they are the types of the "attribute documents" which contain the defined global attribute, and they all turn into Java types. (Named AttributenameAttribute.)

### isBounded() Method

    public boolean isBounded()

True if bounded.

### isBuiltinType() Method

    public boolean isBuiltinType()

True for any of the 40+ built-in types.

### isCompiled() Method

    public boolean isCompiled()

True if this schema type was compiled to have a corresponding Java class.

### isDocumentType() Method

    public boolean isDocumentType()

True if this is a document type.

Document types are generated for every global element. A document type is an unnamed complex type that contains exactly one element: we define these types, because they are the types of the "documents" which contain the defined global elements, and they all turn into Java types. (Named ElementnameDocument.)

### isFacetFixed(int) Method

    public boolean isFacetFixed(int facetCode)

True if the given facet is fixed.

### isFinite() Method

    public boolean isFinite()

True if finite.

### isNoType() Method

    public boolean isNoType()

True for the type object that represents a the absence of a determined type. XML Objects whose type isNoType() are never valid.

### isNumeric() Method

    public boolean isNumeric()

True if numeric.

### isOrderSensitive() Method

    public boolean isOrderSensitive()

True if particles have same defaults, nillability, etc, that are invariant when order changes. Computed only for Javaized types.

### isPrimitiveType() Method

    public boolean isPrimitiveType()

True for any of the 20 primitive types (plus anySimpleType)

### isSimpleType() Method

    public boolean isSimpleType()

True for the anySimpleType and any restrictions/unions/lists.

### isSkippedAnonymousType() Method

    public boolean isSkippedAnonymousType()

True if this anonymous type has no corresponding Java type. True for anonymous types nested within simple type restrictions.

### isURType() Method

    public boolean isURType()

True for anyType and anySimpleType.

### isValidSubstitution(QName) Method

    public boolean isValidSubstitution(QName name)

For document types, true if the given name can be substituted for the document element name.

### matchPatternFacet(String) Method

    public boolean matchPatternFacet(String s)

True if the given string matches the pattern facets. Always true if there are no pattern facets.

### newValue(Object) Method

    public XmlAnySimpleType newValue(Object v)

Creates an immutable simple type value that does not reside in a tree.

### ordered() Method

    public int ordered()

True if ordered. Returns either `SchemaType.UNORDERED```, `SchemaType.PARTIAL_ORDER```, or `SchemaType.TOTAL_ORDER```.