|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.commons.schema.XmlSchemaCollection
public final class XmlSchemaCollection
Contains a cache of XML Schema definition language (XSD).
Nested Class Summary | |
---|---|
static class |
XmlSchemaCollection.SchemaKey
Key that identifies a schema in a collection, composed of a targetNamespace and a system ID. |
Constructor Summary | |
---|---|
XmlSchemaCollection()
Creates new XmlSchemaCollection |
Method Summary | |
---|---|
boolean |
check(XmlSchemaCollection.SchemaKey pKey)
Return an indication of whether a particular schema is in the working stack of schemas. |
XmlSchemaAttribute |
getAttributeByQName(javax.xml.namespace.QName schemaAttributeName)
Find a global attribute by QName in this collection of schemas. |
XmlSchemaElement |
getElementByQName(javax.xml.namespace.QName qname)
Retrieve a global element from the schema collection. |
ExtensionRegistry |
getExtReg()
|
java.util.Map |
getKnownNamespaceMap()
get the namespace map |
NamespacePrefixList |
getNamespaceContext()
Retrieve the namespace context. |
URIResolver |
getSchemaResolver()
Retrieve the custom URI resolver, if any. |
XmlSchemaType |
getTypeByQName(javax.xml.namespace.QName schemaTypeName)
Retrieve a global type from the schema collection. |
XmlSchema[] |
getXmlSchema(java.lang.String systemId)
Retrieve a set containing the XmlSchema instances with the given 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()
Pop the stack of schemas. |
void |
push(XmlSchemaCollection.SchemaKey pKey)
Push a schema onto the stack of schemas. |
XmlSchema |
read(org.w3c.dom.Document doc,
java.lang.String systemId,
ValidationEventHandler veh)
Read an XML Schema from a complete XSD XML DOM Document into this collection. |
XmlSchema |
read(org.w3c.dom.Document doc,
java.lang.String systemId,
ValidationEventHandler veh,
TargetNamespaceValidator validator)
Read an XML Schema from a complete XSD XML DOM Document into this collection. |
XmlSchema |
read(org.w3c.dom.Document doc,
ValidationEventHandler veh)
Read an XML schema into the collection from a DOM document. |
XmlSchema |
read(org.w3c.dom.Element elem)
Read an XML Schema into the collection from a DOM element. |
XmlSchema |
read(org.w3c.dom.Element elem,
java.lang.String systemId)
Read a schema from a DOM tree into the collection. |
XmlSchema |
read(org.xml.sax.InputSource inputSource,
ValidationEventHandler veh)
Read an XML schema into the collection from a SAX InputSource. |
XmlSchema |
read(java.io.Reader r,
ValidationEventHandler veh)
|
XmlSchema |
read(javax.xml.transform.Source source,
ValidationEventHandler veh)
Read an XML schema into the collection from a TRaX source. |
XmlSchema |
schemaForNamespace(java.lang.String uri)
Return the schema from this collection for a particular targetNamespace. |
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)
Set the namespace context for this collection, which controls the assignment of namespace prefixes to namespaces. |
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 |
---|
public XmlSchemaCollection()
Method Detail |
---|
public ExtensionRegistry getExtReg()
public void setExtReg(ExtensionRegistry extReg)
public java.util.Map getKnownNamespaceMap()
public void setKnownNamespaceMap(java.util.Map knownNamespaceMap)
knownNamespaceMap
- a map of previously known XMLSchema objects keyed by their namespace (String)public void setBaseUri(java.lang.String baseUri)
baseUri
- baseUri for this collection.public void setSchemaResolver(URIResolver schemaResolver)
schemaResolver
- resolverpublic URIResolver getSchemaResolver()
public void init()
public XmlSchema read(java.io.Reader r, ValidationEventHandler veh)
public XmlSchema read(org.xml.sax.InputSource inputSource, ValidationEventHandler veh)
inputSource
- the XSD document.veh
- handler that is called back for validation.
public XmlSchema read(javax.xml.transform.Source source, ValidationEventHandler veh)
source
- the XSD document.veh
- handler that is called back for validation.
public XmlSchema read(org.w3c.dom.Document doc, ValidationEventHandler veh)
doc
- the XSD document.veh
- handler that is called back for validation.
public XmlSchema read(org.w3c.dom.Element elem)
elem
- the DOM element for the schema.
public XmlSchema read(org.w3c.dom.Document doc, java.lang.String systemId, ValidationEventHandler veh)
doc
- The schema document.systemId
- System ID for this schema.veh
- handler to be called to check validity of the schema.
public XmlSchema read(org.w3c.dom.Document doc, java.lang.String systemId, ValidationEventHandler veh, TargetNamespaceValidator validator)
doc
- Source document.systemId
- System id.veh
- Stub for future capability to handle validation errors.validator
- object that is called back to check validity of the target namespace.
public XmlSchema read(org.w3c.dom.Element elem, java.lang.String systemId)
elem
- xs:schema DOM element.systemId
- System id.
public XmlSchema[] getXmlSchema(java.lang.String systemId)
systemId
- the system id for this schema
public XmlSchema[] getXmlSchemas()
public XmlSchemaElement getElementByQName(javax.xml.namespace.QName qname)
qname
- the element QName.
public XmlSchemaType getTypeByQName(javax.xml.namespace.QName schemaTypeName)
schemaTypeName
- the QName of the type.
public XmlSchemaAttribute getAttributeByQName(javax.xml.namespace.QName schemaAttributeName)
schemaAttributeName
- the name of the attribute.
public XmlSchema schemaForNamespace(java.lang.String uri)
uri
- target namespace URI.
public NamespacePrefixList getNamespaceContext()
public void setNamespaceContext(NamespacePrefixList namespaceContext)
namespaceContext
- the context.public void push(XmlSchemaCollection.SchemaKey pKey)
pKey
- the schema key.public void pop()
public boolean check(XmlSchemaCollection.SchemaKey pKey)
pKey
- schema key
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |