org.apache.ws.commons.schema
Class XmlSchemaCollection

java.lang.Object
  extended by org.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
 boolean check(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)
           
 XmlSchemaElement getElementByQName(javax.xml.namespace.QName qname)
           
 ExtensionRegistry getExtReg()
           
 java.util.Map getKnownNamespaceMap()
          get the namespace map
 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.
 void pop()
           
 void push(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)
           
 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 setExtReg(ExtensionRegistry extReg)
           
 void setKnownNamespaceMap(java.util.Map knownNamespaceMap)
          sets the known namespace map
 void setNamespaceContext(NamespacePrefixList namespaceContext)
           
 void setSchemaResolver(URIResolver schemaResolver)
          Register a custom URI resolver
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlSchemaCollection

public XmlSchemaCollection()
Creates new XmlSchemaCollection

Method Detail

getExtReg

public ExtensionRegistry getExtReg()

setExtReg

public void setExtReg(ExtensionRegistry extReg)

getKnownNamespaceMap

public java.util.Map getKnownNamespaceMap()
get the namespace map

Returns:
a map of previously known XMLSchema objects keyed by their namespace (String)

setKnownNamespaceMap

public void setKnownNamespaceMap(java.util.Map knownNamespaceMap)
sets the known namespace map

Parameters:
knownNamespaceMap - a map of previously known XMLSchema objects keyed by their namespace (String)

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 - baseUri for this

setSchemaResolver

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

Parameters:
schemaResolver - resolver

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 - the system id for this schema
Returns:
array of XmlSchema objects

getXmlSchemas

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

Returns:
the list of XmlSchema objects

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)

push

public void push(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)

pop

public void pop()

check

public boolean check(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2004-2009 Apache Software Foundation. All Rights Reserved.