Package org.apache.xmlbeans.impl.schema

## Class XQuerySchemaTypeSystem

- java.lang.Object
- - org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase
  - - org.apache.xmlbeans.impl.schema.XQuerySchemaTypeSystem

- All Implemented Interfaces:
    `SchemaTypeLoader`, `SchemaTypeSystem`

      public class XQuerySchemaTypeSystem
      extends SchemaTypeLoaderBase
      implements SchemaTypeSystem

  Same as `BuiltinSchemaTypeSystem` but adds three extra types (dayTimeDuration, yearMonthDuration and anyAtomicType) and makes all the primitives extend anyAtomicType.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `BTC_ANY_ATOMIC` |
    `static int` | `BTC_DAY_TIME_DURATION` |
    `static int` | `BTC_FIRST_XQUERY` |
    `static int` | `BTC_LAST_XQUERY` |
    `static int` | `BTC_YEAR_MONTH_DURATION` |
    `static SchemaTypeImpl` | `ST_ANY_ATOMIC` |
    `static SchemaTypeImpl` | `ST_ANY_SIMPLE` |
    `static SchemaTypeImpl` | `ST_ANY_TYPE` |
    `static SchemaTypeImpl` | `ST_ANY_URI` |
    `static SchemaTypeImpl` | `ST_BASE_64_BINARY` |
    `static SchemaTypeImpl` | `ST_BOOLEAN` |
    `static SchemaTypeImpl` | `ST_BYTE` |
    `static SchemaTypeImpl` | `ST_DATE` |
    `static SchemaTypeImpl` | `ST_DATE_TIME` |
    `static SchemaTypeImpl` | `ST_DAY_TIME_DURATION` |
    `static SchemaTypeImpl` | `ST_DECIMAL` |
    `static SchemaTypeImpl` | `ST_DOUBLE` |
    `static SchemaTypeImpl` | `ST_DURATION` |
    `static SchemaTypeImpl` | `ST_ENTITIES` |
    `static SchemaTypeImpl` | `ST_ENTITY` |
    `static SchemaTypeImpl` | `ST_FLOAT` |
    `static SchemaTypeImpl` | `ST_G_DAY` |
    `static SchemaTypeImpl` | `ST_G_MONTH` |
    `static SchemaTypeImpl` | `ST_G_MONTH_DAY` |
    `static SchemaTypeImpl` | `ST_G_YEAR` |
    `static SchemaTypeImpl` | `ST_G_YEAR_MONTH` |
    `static SchemaTypeImpl` | `ST_HEX_BINARY` |
    `static SchemaTypeImpl` | `ST_ID` |
    `static SchemaTypeImpl` | `ST_IDREF` |
    `static SchemaTypeImpl` | `ST_IDREFS` |
    `static SchemaTypeImpl` | `ST_INT` |
    `static SchemaTypeImpl` | `ST_INTEGER` |
    `static SchemaTypeImpl` | `ST_LANGUAGE` |
    `static SchemaTypeImpl` | `ST_LONG` |
    `static SchemaTypeImpl` | `ST_NAME` |
    `static SchemaTypeImpl` | `ST_NCNAME` |
    `static SchemaTypeImpl` | `ST_NEGATIVE_INTEGER` |
    `static SchemaTypeImpl` | `ST_NMTOKEN` |
    `static SchemaTypeImpl` | `ST_NMTOKENS` |
    `static SchemaTypeImpl` | `ST_NO_TYPE` |
    `static SchemaTypeImpl` | `ST_NON_NEGATIVE_INTEGER` |
    `static SchemaTypeImpl` | `ST_NON_POSITIVE_INTEGER` |
    `static SchemaTypeImpl` | `ST_NORMALIZED_STRING` |
    `static SchemaTypeImpl` | `ST_NOTATION` |
    `static SchemaTypeImpl` | `ST_POSITIVE_INTEGER` |
    `static SchemaTypeImpl` | `ST_QNAME` |
    `static SchemaTypeImpl` | `ST_SHORT` |
    `static SchemaTypeImpl` | `ST_STRING` |
    `static SchemaTypeImpl` | `ST_TIME` |
    `static SchemaTypeImpl` | `ST_TOKEN` |
    `static SchemaTypeImpl` | `ST_UNSIGNED_BYTE` |
    `static SchemaTypeImpl` | `ST_UNSIGNED_INT` |
    `static SchemaTypeImpl` | `ST_UNSIGNED_LONG` |
    `static SchemaTypeImpl` | `ST_UNSIGNED_SHORT` |
    `static SchemaTypeImpl` | `ST_YEAR_MONTH_DURATION` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SchemaAnnotation[]` | `annotations()` | Returns the top-level annotations
    `SchemaAttributeGroup[]` | `attributeGroups()` | Returns the attribute groups defined in this loader.
    `SchemaType[]` | `attributeTypes()` | Returns the attribute types defined in this loader.
    `SchemaType[]` | `documentTypes()` | Returns the document types defined in this loader.
    `void` | `fillInType​(int btc)` | Links a type.
    `SchemaGlobalAttribute` | `findAttribute​(QName name)` | Returns the global attribute defintion with the given name, or null if none.
    `SchemaAttributeGroup.Ref` | `findAttributeGroupRef​(QName name)` | Used for on-demand loading.
    `SchemaGlobalAttribute.Ref` | `findAttributeRef​(QName name)` | Used for on-demand loading.
    `SchemaType` | `findAttributeType​(QName name)` | Returns the attribute type containing the given attribute name, or null if none.
    `SchemaType.Ref` | `findAttributeTypeRef​(QName name)` | Used for on-demand loading.
    `SchemaType` | `findDocumentType​(QName name)` | Returns the document type rooted at the given element name, or null if none.
    `SchemaType.Ref` | `findDocumentTypeRef​(QName name)` | Used for on-demand loading.
    `SchemaGlobalElement` | `findElement​(QName name)` | Returns the global element defintion with the given name, or null if none.
    `SchemaGlobalElement.Ref` | `findElementRef​(QName name)` | Used for on-demand loading.
    `SchemaIdentityConstraint.Ref` | `findIdentityConstraintRef​(QName name)` | Used for on-demand loading.
    `SchemaModelGroup.Ref` | `findModelGroupRef​(QName name)` | Used for on-demand loading.
    `SchemaType` | `findType​(QName name)` | Returns the type with the given name, or null if none.
    `SchemaType.Ref` | `findTypeRef​(QName name)` | Used for on-demand loading.
    `static SchemaTypeSystem` | `get()` |
    `ClassLoader` | `getClassLoader()` | Returns the classloader used by this loader for resolving types.
    `String` | `getName()` | Returns the name of this loader.
    `static SchemaType` | `getNoType()` |
    `InputStream` | `getSourceAsStream​(String sourceName)` | Loads original XSD source as a stream.
    `SchemaGlobalAttribute[]` | `globalAttributes()` | Returns the global attributes defined in this loader.
    `SchemaGlobalElement[]` | `globalElements()` | Returns the global elements defined in this loader.
    `SchemaType[]` | `globalTypes()` | Returns the global types defined in this loader.
    `String` | `handleForType​(SchemaType type)` | Returns the handle for the given type within this loader.
    `boolean` | `isNamespaceDefined​(String namespace)` | True if the typeloader contains any definitions in the given namespace.
    `SchemaModelGroup[]` | `modelGroups()` | Returns the model groups defined in this loader.
    `void` | `resolve()` | Initializes a type system (resolves all handles within the type system).
    `SchemaComponent` | `resolveHandle​(String handle)` | Locates a type, element, or attribute using the handle.
    `void` | `save​(Filer filer)` | Saves this type system using a Filer
    `void` | `saveToDirectory​(File classDir)` | Saves this type to a directory.
    `SchemaType` | `typeForClassname​(String classname)` | Finds a type for a given fully-qualified XML Bean classname
    `SchemaType` | `typeForHandle​(String handle)` | Locates a type, element, or attribute using the handle.

    - ### Methods inherited from class org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase

      `compilePath, compilePath, compileQuery, compileQuery, findAttributeGroup, findModelGroup, newDomImplementation, newInstance, newXmlSaxHandler, parse, parse, parse, parse, parse, parse, parse, typeForSignature`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.xmlbeans.SchemaTypeLoader

      `compilePath, compileQuery, findAttributeGroup, findModelGroup, newDomImplementation, newInstance, newXmlSaxHandler, parse, parse, parse, parse, parse, parse, parse, typeForSignature`

- - ### Field Detail

    - #### BTC_FIRST_XQUERY

          public static final int BTC_FIRST_XQUERY

      See Also:
        Constant Field Values

    - #### BTC_ANY_ATOMIC

          public static final int BTC_ANY_ATOMIC

      See Also:
        Constant Field Values

    - #### BTC_DAY_TIME_DURATION

          public static final int BTC_DAY_TIME_DURATION

      See Also:
        Constant Field Values

    - #### BTC_YEAR_MONTH_DURATION

          public static final int BTC_YEAR_MONTH_DURATION

      See Also:
        Constant Field Values

    - #### BTC_LAST_XQUERY

          public static final int BTC_LAST_XQUERY

      See Also:
        Constant Field Values

    - #### ST_ANY_TYPE

          public static final SchemaTypeImpl ST_ANY_TYPE

    - #### ST_ANY_SIMPLE

          public static final SchemaTypeImpl ST_ANY_SIMPLE

    - #### ST_ANY_ATOMIC

          public static final SchemaTypeImpl ST_ANY_ATOMIC

    - #### ST_BOOLEAN

          public static final SchemaTypeImpl ST_BOOLEAN

    - #### ST_BASE_64_BINARY

          public static final SchemaTypeImpl ST_BASE_64_BINARY

    - #### ST_HEX_BINARY

          public static final SchemaTypeImpl ST_HEX_BINARY

    - #### ST_ANY_URI

          public static final SchemaTypeImpl ST_ANY_URI

    - #### ST_QNAME

          public static final SchemaTypeImpl ST_QNAME

    - #### ST_NOTATION

          public static final SchemaTypeImpl ST_NOTATION

    - #### ST_FLOAT

          public static final SchemaTypeImpl ST_FLOAT

    - #### ST_DOUBLE

          public static final SchemaTypeImpl ST_DOUBLE

    - #### ST_DECIMAL

          public static final SchemaTypeImpl ST_DECIMAL

    - #### ST_STRING

          public static final SchemaTypeImpl ST_STRING

    - #### ST_DURATION

          public static final SchemaTypeImpl ST_DURATION

    - #### ST_DATE_TIME

          public static final SchemaTypeImpl ST_DATE_TIME

    - #### ST_TIME

          public static final SchemaTypeImpl ST_TIME

    - #### ST_DATE

          public static final SchemaTypeImpl ST_DATE

    - #### ST_G_YEAR_MONTH

          public static final SchemaTypeImpl ST_G_YEAR_MONTH

    - #### ST_G_YEAR

          public static final SchemaTypeImpl ST_G_YEAR

    - #### ST_G_MONTH_DAY

          public static final SchemaTypeImpl ST_G_MONTH_DAY

    - #### ST_G_DAY

          public static final SchemaTypeImpl ST_G_DAY

    - #### ST_G_MONTH

          public static final SchemaTypeImpl ST_G_MONTH

    - #### ST_INTEGER

          public static final SchemaTypeImpl ST_INTEGER

    - #### ST_LONG

          public static final SchemaTypeImpl ST_LONG

    - #### ST_INT

          public static final SchemaTypeImpl ST_INT

    - #### ST_SHORT

          public static final SchemaTypeImpl ST_SHORT

    - #### ST_BYTE

          public static final SchemaTypeImpl ST_BYTE

    - #### ST_NON_POSITIVE_INTEGER

          public static final SchemaTypeImpl ST_NON_POSITIVE_INTEGER

    - #### ST_NEGATIVE_INTEGER

          public static final SchemaTypeImpl ST_NEGATIVE_INTEGER

    - #### ST_NON_NEGATIVE_INTEGER

          public static final SchemaTypeImpl ST_NON_NEGATIVE_INTEGER

    - #### ST_POSITIVE_INTEGER

          public static final SchemaTypeImpl ST_POSITIVE_INTEGER

    - #### ST_UNSIGNED_LONG

          public static final SchemaTypeImpl ST_UNSIGNED_LONG

    - #### ST_UNSIGNED_INT

          public static final SchemaTypeImpl ST_UNSIGNED_INT

    - #### ST_UNSIGNED_SHORT

          public static final SchemaTypeImpl ST_UNSIGNED_SHORT

    - #### ST_UNSIGNED_BYTE

          public static final SchemaTypeImpl ST_UNSIGNED_BYTE

    - #### ST_NORMALIZED_STRING

          public static final SchemaTypeImpl ST_NORMALIZED_STRING

    - #### ST_TOKEN

          public static final SchemaTypeImpl ST_TOKEN

    - #### ST_NAME

          public static final SchemaTypeImpl ST_NAME

    - #### ST_NCNAME

          public static final SchemaTypeImpl ST_NCNAME

    - #### ST_LANGUAGE

          public static final SchemaTypeImpl ST_LANGUAGE

    - #### ST_ID

          public static final SchemaTypeImpl ST_ID

    - #### ST_IDREF

          public static final SchemaTypeImpl ST_IDREF

    - #### ST_IDREFS

          public static final SchemaTypeImpl ST_IDREFS

    - #### ST_ENTITY

          public static final SchemaTypeImpl ST_ENTITY

    - #### ST_ENTITIES

          public static final SchemaTypeImpl ST_ENTITIES

    - #### ST_NMTOKEN

          public static final SchemaTypeImpl ST_NMTOKEN

    - #### ST_NMTOKENS

          public static final SchemaTypeImpl ST_NMTOKENS

    - #### ST_DAY_TIME_DURATION

          public static final SchemaTypeImpl ST_DAY_TIME_DURATION

    - #### ST_YEAR_MONTH_DURATION

          public static final SchemaTypeImpl ST_YEAR_MONTH_DURATION

    - #### ST_NO_TYPE

          public static final SchemaTypeImpl ST_NO_TYPE

  - ### Method Detail

    - #### get

          public static SchemaTypeSystem get()

    - #### getName

          public String getName()

      Returns the name of this loader.
      Specified by:
        `getName` in interface `SchemaTypeSystem`

    - #### isNamespaceDefined

          public boolean isNamespaceDefined​(String namespace)

      Description copied from interface: `SchemaTypeLoader`
      True if the typeloader contains any definitions in the given namespace.
      Specified by:
        `isNamespaceDefined` in interface `SchemaTypeLoader`

    - #### findType

          public SchemaType findType​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Returns the type with the given name, or null if none.
      Specified by:
        `findType` in interface `SchemaTypeLoader`
      Overrides:
        `findType` in class `SchemaTypeLoaderBase`

    - #### findDocumentType

          public SchemaType findDocumentType​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Returns the document type rooted at the given element name, or null if none.
      Specified by:
        `findDocumentType` in interface `SchemaTypeLoader`
      Overrides:
        `findDocumentType` in class `SchemaTypeLoaderBase`

    - #### findAttributeType

          public SchemaType findAttributeType​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Returns the attribute type containing the given attribute name, or null if none.
      Specified by:
        `findAttributeType` in interface `SchemaTypeLoader`
      Overrides:
        `findAttributeType` in class `SchemaTypeLoaderBase`

    - #### findElement

          public SchemaGlobalElement findElement​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Returns the global element defintion with the given name, or null if none.
      Specified by:
        `findElement` in interface `SchemaTypeLoader`
      Overrides:
        `findElement` in class `SchemaTypeLoaderBase`

    - #### findAttribute

          public SchemaGlobalAttribute findAttribute​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Returns the global attribute defintion with the given name, or null if none.
      Specified by:
        `findAttribute` in interface `SchemaTypeLoader`
      Overrides:
        `findAttribute` in class `SchemaTypeLoaderBase`

    - #### findTypeRef

          public SchemaType.Ref findTypeRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findTypeRef` in interface `SchemaTypeLoader`

    - #### findDocumentTypeRef

          public SchemaType.Ref findDocumentTypeRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findDocumentTypeRef` in interface `SchemaTypeLoader`

    - #### findAttributeTypeRef

          public SchemaType.Ref findAttributeTypeRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findAttributeTypeRef` in interface `SchemaTypeLoader`

    - #### findElementRef

          public SchemaGlobalElement.Ref findElementRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findElementRef` in interface `SchemaTypeLoader`

    - #### findAttributeRef

          public SchemaGlobalAttribute.Ref findAttributeRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findAttributeRef` in interface `SchemaTypeLoader`

    - #### findModelGroupRef

          public SchemaModelGroup.Ref findModelGroupRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findModelGroupRef` in interface `SchemaTypeLoader`

    - #### findAttributeGroupRef

          public SchemaAttributeGroup.Ref findAttributeGroupRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findAttributeGroupRef` in interface `SchemaTypeLoader`

    - #### findIdentityConstraintRef

          public SchemaIdentityConstraint.Ref findIdentityConstraintRef​(QName name)

      Description copied from interface: `SchemaTypeLoader`
      Used for on-demand loading.
      Specified by:
        `findIdentityConstraintRef` in interface `SchemaTypeLoader`

    - #### typeForClassname

          public SchemaType typeForClassname​(String classname)

      Description copied from interface: `SchemaTypeLoader`
      Finds a type for a given fully-qualified XML Bean classname
      Specified by:
        `typeForClassname` in interface `SchemaTypeLoader`

    - #### getSourceAsStream

          public InputStream getSourceAsStream​(String sourceName)

      Description copied from interface: `SchemaTypeLoader`
      Loads original XSD source as a stream. See `SchemaComponent.getSourceName()`.
      Specified by:
        `getSourceAsStream` in interface `SchemaTypeLoader`

    - #### globalTypes

          public SchemaType[] globalTypes()

      Returns the global types defined in this loader.
      Specified by:
        `globalTypes` in interface `SchemaTypeSystem`

    - #### documentTypes

          public SchemaType[] documentTypes()

      Returns the document types defined in this loader.
      Specified by:
        `documentTypes` in interface `SchemaTypeSystem`

    - #### attributeTypes

          public SchemaType[] attributeTypes()

      Returns the attribute types defined in this loader.
      Specified by:
        `attributeTypes` in interface `SchemaTypeSystem`

    - #### globalElements

          public SchemaGlobalElement[] globalElements()

      Returns the global elements defined in this loader.
      Specified by:
        `globalElements` in interface `SchemaTypeSystem`

    - #### globalAttributes

          public SchemaGlobalAttribute[] globalAttributes()

      Returns the global attributes defined in this loader.
      Specified by:
        `globalAttributes` in interface `SchemaTypeSystem`

    - #### modelGroups

          public SchemaModelGroup[] modelGroups()

      Returns the model groups defined in this loader.
      Specified by:
        `modelGroups` in interface `SchemaTypeSystem`

    - #### attributeGroups

          public SchemaAttributeGroup[] attributeGroups()

      Returns the attribute groups defined in this loader.
      Specified by:
        `attributeGroups` in interface `SchemaTypeSystem`

    - #### annotations

          public SchemaAnnotation[] annotations()

      Description copied from interface: `SchemaTypeSystem`
      Returns the top-level annotations
      Specified by:
        `annotations` in interface `SchemaTypeSystem`

    - #### handleForType

          public String handleForType​(SchemaType type)

      Returns the handle for the given type within this loader.

    - #### getClassLoader

          public ClassLoader getClassLoader()

      Returns the classloader used by this loader for resolving types.
      Specified by:
        `getClassLoader` in interface `SchemaTypeSystem`

    - #### saveToDirectory

          public void saveToDirectory​(File classDir)

      Saves this type to a directory.
      Specified by:
        `saveToDirectory` in interface `SchemaTypeSystem`

    - #### save

          public void save​(Filer filer)

      Saves this type system using a Filer
      Specified by:
        `save` in interface `SchemaTypeSystem`

    - #### resolve

          public void resolve()

      Description copied from interface: `SchemaTypeSystem`
      Initializes a type system (resolves all handles within the type system).
      Specified by:
        `resolve` in interface `SchemaTypeSystem`

    - #### typeForHandle

          public SchemaType typeForHandle​(String handle)

      Description copied from interface: `SchemaTypeSystem`
      Locates a type, element, or attribute using the handle.
      Specified by:
        `typeForHandle` in interface `SchemaTypeSystem`

    - #### resolveHandle

          public SchemaComponent resolveHandle​(String handle)

      Description copied from interface: `SchemaTypeSystem`
      Locates a type, element, or attribute using the handle.
      Specified by:
        `resolveHandle` in interface `SchemaTypeSystem`

    - #### fillInType

          public void fillInType​(int btc)

      Links a type.

    - #### getNoType

          public static SchemaType getNoType()