org.apache.ws.commons.schema
Class XmlSchemaCollection

java.lang.Object
  extended byorg.apache.ws.commons.schema.XmlSchemaCollection

public final class XmlSchemaCollection
extends java.lang.Object

Contains a cache of XML Schema definition language (XSD).


Constructor Summary
XmlSchemaCollection()
          Creates new XmlSchemaCollection
 
Method Summary
 XmlSchemaElement getElementByQName(javax.xml.namespace.QName qname)
           
 NamespacePrefixList getNamespaceContext()
           
 XmlSchemaType getTypeByQName(javax.xml.namespace.QName schemaTypeName)
           
 XmlSchema[] getXmlSchema(java.lang.String systemId)
          Retrieve a set of XmlSchema instances with the given its system ID.
 XmlSchema[] getXmlSchemas()
          Returns an array of all the XmlSchemas in this collection.
 void init()
          This section should comply to the XMLSchema specification; see http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#built-in-datatypes.
 XmlSchema read(org.w3c.dom.Document doc, java.lang.String uri, ValidationEventHandler veh)
           
 XmlSchema read(org.w3c.dom.Document doc, java.lang.String uri, ValidationEventHandler veh, TargetNamespaceValidator validator)
           
 XmlSchema read(org.w3c.dom.Document doc, ValidationEventHandler veh)
           
 XmlSchema read(org.w3c.dom.Element elem)
           
 XmlSchema read(org.w3c.dom.Element elem, java.lang.String uri)
           
 XmlSchema read(org.xml.sax.InputSource inputSource, ValidationEventHandler veh)
           
 XmlSchema read(java.io.Reader r, ValidationEventHandler veh)
           
 XmlSchema read(javax.xml.transform.Source source, ValidationEventHandler veh)
           
 void setBaseUri(java.lang.String baseUri)
          Set the base URI.
 void setNamespaceContext(NamespacePrefixList namespaceContext)
           
 void setSchemaResolver(URIResolver schemaResolver)
          Register a custom URI resolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlSchemaCollection

public XmlSchemaCollection()
Creates new XmlSchemaCollection

Method Detail

setBaseUri

public void setBaseUri(java.lang.String baseUri)
Set the base URI. This is used when schemas need to be loaded from relative locations

Parameters:
baseUri -

setSchemaResolver

public void setSchemaResolver(URIResolver schemaResolver)
Register a custom URI resolver

Parameters:
schemaResolver -

init

public void init()
This section should comply to the XMLSchema specification; see http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#built-in-datatypes. This needs to be inspected by another pair of eyes


read

public XmlSchema read(java.io.Reader r,
                      ValidationEventHandler veh)

read

public XmlSchema read(org.xml.sax.InputSource inputSource,
                      ValidationEventHandler veh)

read

public XmlSchema read(javax.xml.transform.Source source,
                      ValidationEventHandler veh)

read

public XmlSchema read(org.w3c.dom.Document doc,
                      ValidationEventHandler veh)

read

public XmlSchema read(org.w3c.dom.Element elem)

read

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

read

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

read

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

getXmlSchema

public XmlSchema[] getXmlSchema(java.lang.String systemId)
Retrieve a set of XmlSchema instances with the given its system ID. In general, this will return a single instance, or none. However, if the schema has no targetNamespace attribute and was included from schemata with different target namespaces, then it may occur, that multiple schema instances with different logical target namespaces may be returned.

Parameters:
systemId -

getXmlSchemas

public XmlSchema[] getXmlSchemas()
Returns an array of all the XmlSchemas in this collection.


getElementByQName

public XmlSchemaElement getElementByQName(javax.xml.namespace.QName qname)

getTypeByQName

public XmlSchemaType getTypeByQName(javax.xml.namespace.QName schemaTypeName)

getNamespaceContext

public NamespacePrefixList getNamespaceContext()

setNamespaceContext

public void setNamespaceContext(NamespacePrefixList namespaceContext)