Apache CXF API

org.apache.cxf.common.xmlschema
Class SchemaCollection

java.lang.Object
  extended by org.apache.cxf.common.xmlschema.SchemaCollection

public class SchemaCollection
extends java.lang.Object

Wrapper class for XmlSchemaCollection that deals with various quirks and bugs. One bug is WSCOMMONS-272.


Constructor Summary
SchemaCollection()
           
SchemaCollection(org.apache.ws.commons.schema.XmlSchemaCollection col)
           
 
Method Summary
 void addGlobalElementToSchema(org.apache.ws.commons.schema.XmlSchemaElement element)
           
static void addGlobalElementToSchema(org.apache.ws.commons.schema.XmlSchema schema, org.apache.ws.commons.schema.XmlSchemaElement element)
           
static void addGlobalTypeToSchema(org.apache.ws.commons.schema.XmlSchema schema, org.apache.ws.commons.schema.XmlSchemaType type)
           
 boolean equals(java.lang.Object obj)
           
 org.apache.ws.commons.schema.XmlSchemaElement getElementByQName(javax.xml.namespace.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(java.lang.String namespaceURI)
          This function is not part of the XmlSchema API.
 org.apache.ws.commons.schema.XmlSchema getSchemaForElement(javax.xml.namespace.QName name)
           
 org.apache.ws.commons.schema.XmlSchemaType getTypeByQName(javax.xml.namespace.QName schemaTypeName)
           
 org.apache.ws.commons.schema.XmlSchema[] getXmlSchema(java.lang.String systemId)
           
 org.apache.ws.commons.schema.XmlSchema[] getXmlSchemas()
           
 int hashCode()
           
 void init()
           
 org.apache.ws.commons.schema.XmlSchema newXmlSchemaInCollection(java.lang.String namespaceURI)
          This is a really ugly trick to get around a bug or oversight in XmlSchema, which is that there is no way to programmatically construct an XmlSchema instance that ends up cataloged in a collection.
 org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Document doc, java.lang.String uri, org.apache.ws.commons.schema.ValidationEventHandler veh)
           
 org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Document doc, java.lang.String uri, org.apache.ws.commons.schema.ValidationEventHandler veh, org.apache.ws.commons.schema.utils.TargetNamespaceValidator validator)
           
 org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Document doc, org.apache.ws.commons.schema.ValidationEventHandler veh)
           
 org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Element elem)
           
 org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Element elem, java.lang.String uri)
           
 org.apache.ws.commons.schema.XmlSchema read(org.xml.sax.InputSource inputSource, org.apache.ws.commons.schema.ValidationEventHandler veh)
           
 org.apache.ws.commons.schema.XmlSchema read(java.io.Reader r, org.apache.ws.commons.schema.ValidationEventHandler veh)
           
 org.apache.ws.commons.schema.XmlSchema read(javax.xml.transform.Source source, org.apache.ws.commons.schema.ValidationEventHandler veh)
           
 void setBaseUri(java.lang.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(javax.xml.namespace.QName referrer, javax.xml.namespace.QName elementQName)
           
 void validateQNameNamespace(javax.xml.namespace.QName qname)
          Validate that a qualified name points to some namespace in the schema.
 void validateTypeName(javax.xml.namespace.QName referrer, javax.xml.namespace.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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getElementByQName

public org.apache.ws.commons.schema.XmlSchemaElement getElementByQName(javax.xml.namespace.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(javax.xml.namespace.QName schemaTypeName)

getXmlSchema

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

getXmlSchemas

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

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

init

public void init()

read

public org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Document doc,
                                                   java.lang.String uri,
                                                   org.apache.ws.commons.schema.ValidationEventHandler veh,
                                                   org.apache.ws.commons.schema.utils.TargetNamespaceValidator validator)

read

public org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Document doc,
                                                   java.lang.String uri,
                                                   org.apache.ws.commons.schema.ValidationEventHandler veh)

read

public org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Document doc,
                                                   org.apache.ws.commons.schema.ValidationEventHandler veh)

read

public org.apache.ws.commons.schema.XmlSchema read(org.w3c.dom.Element elem,
                                                   java.lang.String uri)

read

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

read

public org.apache.ws.commons.schema.XmlSchema read(org.xml.sax.InputSource inputSource,
                                                   org.apache.ws.commons.schema.ValidationEventHandler veh)

read

public org.apache.ws.commons.schema.XmlSchema read(java.io.Reader r,
                                                   org.apache.ws.commons.schema.ValidationEventHandler veh)

read

public org.apache.ws.commons.schema.XmlSchema read(javax.xml.transform.Source source,
                                                   org.apache.ws.commons.schema.ValidationEventHandler veh)

setBaseUri

public void setBaseUri(java.lang.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(java.lang.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(javax.xml.namespace.QName name)

newXmlSchemaInCollection

public org.apache.ws.commons.schema.XmlSchema newXmlSchemaInCollection(java.lang.String namespaceURI)
This is a really ugly trick to get around a bug or oversight in XmlSchema, which is that there is no way to programmatically construct an XmlSchema instance that ends up cataloged in a collection. If there is a fix to WSCOMMONS-272, this can go away.

Parameters:
namespaceURI - TNS for new schema.
Returns:
new schema

validateQNameNamespace

public void validateQNameNamespace(javax.xml.namespace.QName qname)
Validate that a qualified name points to some namespace in the schema.

Parameters:
qname -

validateElementName

public void validateElementName(javax.xml.namespace.QName referrer,
                                javax.xml.namespace.QName elementQName)

validateTypeName

public void validateTypeName(javax.xml.namespace.QName referrer,
                             javax.xml.namespace.QName typeQName)

addGlobalElementToSchema

public void addGlobalElementToSchema(org.apache.ws.commons.schema.XmlSchemaElement element)

addGlobalElementToSchema

public static void addGlobalElementToSchema(org.apache.ws.commons.schema.XmlSchema schema,
                                            org.apache.ws.commons.schema.XmlSchemaElement element)

addGlobalTypeToSchema

public static void addGlobalTypeToSchema(org.apache.ws.commons.schema.XmlSchema schema,
                                         org.apache.ws.commons.schema.XmlSchemaType type)

Apache CXF API

Apache CXF