org.apache.ode.utils.xsd

## Class SchemaModelImpl

- java.lang.Object
- - org.apache.ode.utils.xsd.SchemaModelImpl

- All Implemented Interfaces:
    SchemaModel

      public class SchemaModelImpl
      extends java.lang.Object
      implements SchemaModel

  Xerces based schema model.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SchemaModelImpl.InternalSchemaResolver`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isCompatible(javax.xml.namespace.QName type1, javax.xml.namespace.QName type2)` Determines if two types are compatible using the following logic: if type a is Element, and type b is Element, they must be identical element types.
    `boolean` | `isSimpleType(javax.xml.namespace.QName type)` Checks if type is a simple type.
    `boolean` | `knowsElementType(javax.xml.namespace.QName elementType)` Checks if model knows the type as an element type.
    `boolean` | `knowsSchemaType(javax.xml.namespace.QName schemaType)` Checks if the model know the type as a schema type.
    `static SchemaModel` | `newModel(java.util.Map<java.net.URI,byte[]> schemas)` Generate a schema model from a collection of schemas.

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

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

- - ### Method Detail

    - #### newModel

          public static final SchemaModel newModel(java.util.Map<java.net.URI,byte[]> schemas)

      Generate a schema model from a collection of schemas.
      Parameters:
        `schemas` - collection of schemas (indexed by systemId)
      Returns:
        a `SchemaModel`

    - #### isCompatible

          public boolean isCompatible(javax.xml.namespace.QName type1,
                             javax.xml.namespace.QName type2)

      Description copied from interface: `SchemaModel`

      Determines if two types are compatible using the following logic:

      - if type a is Element, and type b is Element, they must be identical element types.
      - if type a and/or b is element/schema, schema/element, or schema/schema, they are compatible if one is derived from the other
      Specified by:
        `isCompatible` in interface `SchemaModel`
      Returns:
      See Also:
        `SchemaModel.isCompatible(javax.xml.namespace.QName, javax.xml.namespace.QName)`

    - #### isSimpleType

          public boolean isSimpleType(javax.xml.namespace.QName type)

      Description copied from interface: `SchemaModel`
      Checks if type is a simple type.
      Specified by:
        `isSimpleType` in interface `SchemaModel`
      Returns:
        DOCUMENTME
      See Also:
        `SchemaModel.isSimpleType(javax.xml.namespace.QName)`

    - #### knowsElementType

          public boolean knowsElementType(javax.xml.namespace.QName elementType)

      Description copied from interface: `SchemaModel`
      Checks if model knows the type as an element type.
      Specified by:
        `knowsElementType` in interface `SchemaModel`
      Returns:
        DOCUMENTME
      See Also:
        `SchemaModel.knowsElementType(javax.xml.namespace.QName)`

    - #### knowsSchemaType

          public boolean knowsSchemaType(javax.xml.namespace.QName schemaType)

      Description copied from interface: `SchemaModel`
      Checks if the model know the type as a schema type.
      Specified by:
        `knowsSchemaType` in interface `SchemaModel`
      Returns:
        DOCUMENTME
      See Also:
        `SchemaModel.knowsSchemaType(javax.xml.namespace.QName)`