Package org.apache.cxf.common.xmlschema

## Class SchemaCollection

- java.lang.Object
- - org.apache.cxf.common.xmlschema.SchemaCollection

-     public class SchemaCollection
      extends Object

  Wrapper class for XmlSchemaCollection that deals with various quirks and bugs.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SchemaCollection()` |
    `SchemaCollection​(org.apache.ws.commons.schema.XmlSchemaCollection col)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addCrossImports()` |
    `boolean` | `equals​(Object obj)` |
    `org.apache.ws.commons.schema.XmlSchemaAttribute` | `getAttributeByQName​(QName qname)` |
    `org.apache.ws.commons.schema.XmlSchemaElement` | `getElementByQName​(QName qname)` |
    `org.apache.ws.commons.schema.extensions.ExtensionRegistry` | `getExtReg()` |
    `org.apache.ws.commons.schema.utils.NamespacePrefixList` | `getNamespaceContext()` |
    `org.apache.ws.commons.schema.XmlSchema` | `getSchemaByTargetNamespace​(String namespaceURI)` | This function is not part of the XmlSchema API.
    `org.apache.ws.commons.schema.XmlSchema` | `getSchemaForElement​(QName name)` |
    `org.apache.ws.commons.schema.XmlSchemaType` | `getTypeByQName​(QName schemaTypeName)` |
    `org.apache.ws.commons.schema.XmlSchema[]` | `getXmlSchema​(String systemId)` |
    `org.apache.ws.commons.schema.XmlSchemaCollection` | `getXmlSchemaCollection()` |
    `org.apache.ws.commons.schema.XmlSchema[]` | `getXmlSchemas()` |
    `int` | `hashCode()` |
    `void` | `init()` |
    `org.apache.ws.commons.schema.XmlSchema` | `newXmlSchemaInCollection​(String namespaceURI)` | Once upon a time, XmlSchema had a bug in the constructor used in this function.
    `org.apache.ws.commons.schema.XmlSchema` | `read​(Document d, String uri)` |
    `org.apache.ws.commons.schema.XmlSchema` | `read​(Element elem)` |
    `org.apache.ws.commons.schema.XmlSchema` | `read​(Element elem, String uri)` |
    `void` | `setBaseUri​(String baseUri)` |
    `void` | `setExtReg​(org.apache.ws.commons.schema.extensions.ExtensionRegistry extReg)` |
    `void` | `setNamespaceContext​(org.apache.ws.commons.schema.utils.NamespacePrefixList namespaceContext)` |
    `void` | `setSchemaResolver​(org.apache.ws.commons.schema.resolver.URIResolver schemaResolver)` |
    `void` | `validateElementName​(QName referrer, QName elementQName)` |
    `void` | `validateQNameNamespace​(QName qname)` | Validate that a qualified name points to some namespace in the schema.
    `void` | `validateTypeName​(QName referrer, QName typeQName)` |

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

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

- - ### Constructor Detail

    - #### SchemaCollection

          public SchemaCollection()

    - #### SchemaCollection

          public SchemaCollection​(org.apache.ws.commons.schema.XmlSchemaCollection col)

  - ### Method Detail

    - #### getXmlSchemaCollection

          public org.apache.ws.commons.schema.XmlSchemaCollection getXmlSchemaCollection()

    - #### equals

          public boolean equals​(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getElementByQName

          public org.apache.ws.commons.schema.XmlSchemaElement getElementByQName​(QName qname)

    - #### getAttributeByQName

          public org.apache.ws.commons.schema.XmlSchemaAttribute getAttributeByQName​(QName qname)

    - #### getExtReg

          public org.apache.ws.commons.schema.extensions.ExtensionRegistry getExtReg()

    - #### getNamespaceContext

          public org.apache.ws.commons.schema.utils.NamespacePrefixList getNamespaceContext()

    - #### getTypeByQName

          public org.apache.ws.commons.schema.XmlSchemaType getTypeByQName​(QName schemaTypeName)

    - #### getXmlSchema

          public org.apache.ws.commons.schema.XmlSchema[] getXmlSchema​(String systemId)

    - #### getXmlSchemas

          public org.apache.ws.commons.schema.XmlSchema[] getXmlSchemas()

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### init

          public void init()

    - #### read

          public org.apache.ws.commons.schema.XmlSchema read​(Element elem,
                                                             String uri)

    - #### read

          public org.apache.ws.commons.schema.XmlSchema read​(Document d,
                                                             String uri)

    - #### read

          public org.apache.ws.commons.schema.XmlSchema read​(Element elem)

    - #### setBaseUri

          public void setBaseUri​(String baseUri)

    - #### setExtReg

          public void setExtReg​(org.apache.ws.commons.schema.extensions.ExtensionRegistry extReg)

    - #### setNamespaceContext

          public void setNamespaceContext​(org.apache.ws.commons.schema.utils.NamespacePrefixList namespaceContext)

    - #### setSchemaResolver

          public void setSchemaResolver​(org.apache.ws.commons.schema.resolver.URIResolver schemaResolver)

    - #### getSchemaByTargetNamespace

          public org.apache.ws.commons.schema.XmlSchema getSchemaByTargetNamespace​(String namespaceURI)

      This function is not part of the XmlSchema API. Who knows why?
      Parameters:
        `namespaceURI` - targetNamespace
      Returns:
        schema, or null.

    - #### getSchemaForElement

          public org.apache.ws.commons.schema.XmlSchema getSchemaForElement​(QName name)

    - #### newXmlSchemaInCollection

          public org.apache.ws.commons.schema.XmlSchema newXmlSchemaInCollection​(String namespaceURI)

      Once upon a time, XmlSchema had a bug in the constructor used in this function. So this wrapper was created to hold a workaround.
      Parameters:
        `namespaceURI` - TNS for new schema.
      Returns:
        new schema

    - #### validateQNameNamespace

          public void validateQNameNamespace​(QName qname)

      Validate that a qualified name points to some namespace in the schema.
      Parameters:
        `qname` -

    - #### validateElementName

          public void validateElementName​(QName referrer,
                                          QName elementQName)

    - #### validateTypeName

          public void validateTypeName​(QName referrer,
                                       QName typeQName)

    - #### addCrossImports

          public void addCrossImports()