|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(QName schemaAttributeName)
Find a global attribute by QName in this collection of schemas. |
XmlSchemaAttributeGroup |
getAttributeGroupByQName(QName name)
|
XmlSchemaElement |
getElementByQName(QName qname)
Retrieve a global element from the schema collection. |
ExtensionRegistry |
getExtReg()
|
XmlSchemaGroup |
getGroupByQName(QName name)
|
Map<String,XmlSchema> |
getKnownNamespaceMap()
get the namespace map |
NamespacePrefixList |
getNamespaceContext()
Retrieve the namespace context. |
XmlSchemaNotation |
getNotationByQName(QName name)
|
URIResolver |
getSchemaResolver()
Retrieve the custom URI resolver, if any. |
XmlSchemaType |
getTypeByQName(QName schemaTypeName)
Retrieve a global type from the schema collection. |
XmlSchema[] |
getXmlSchema(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(Document doc)
Read an XML schema into the collection from a DOM document. |
XmlSchema |
read(Document doc,
String systemId)
Read an XML Schema from a complete XSD XML DOM Document into this collection. |
XmlSchema |
read(Document doc,
String systemId,
TargetNamespaceValidator validator)
Read an XML Schema from a complete XSD XML DOM Document into this collection. |
XmlSchema |
read(Element elem)
Read an XML Schema into the collection from a DOM element. |
XmlSchema |
read(Element elem,
String systemId)
Read a schema from a DOM tree into the collection. |
XmlSchema |
read(InputSource inputSource)
Read an XML schema into the collection from a SAX InputSource. |
XmlSchema |
read(Reader r)
|
XmlSchema |
read(Source source)
Read an XML schema into the collection from a TRaX source. |
XmlSchema |
schemaForNamespace(String uri)
Return the schema from this collection for a particular targetNamespace. |
void |
setBaseUri(String baseUri)
Set the base URI. |
void |
setExtReg(ExtensionRegistry extReg)
|
void |
setKnownNamespaceMap(Map<String,XmlSchema> 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 |
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 boolean check(XmlSchemaCollection.SchemaKey pKey)
pKey
- schema key
public ExtensionRegistry getExtReg()
public Map<String,XmlSchema> getKnownNamespaceMap()
public NamespacePrefixList getNamespaceContext()
public URIResolver getSchemaResolver()
public XmlSchemaType getTypeByQName(QName schemaTypeName)
schemaTypeName
- the QName of the type.
public XmlSchema[] getXmlSchema(String systemId)
systemId
- the system id for this schema
public XmlSchema[] getXmlSchemas()
public void init()
public void pop()
public void push(XmlSchemaCollection.SchemaKey pKey)
pKey
- the schema key.public XmlSchema read(Document doc, String systemId)
doc
- The schema document.systemId
- System ID for this schema.
public XmlSchema read(Document doc, String systemId, TargetNamespaceValidator validator)
doc
- Source document.systemId
- System id.validator
- object that is called back to check validity of the target namespace.
public XmlSchema read(Document doc)
doc
- the XSD document.veh
- handler that is called back for validation.
public XmlSchema read(Element elem)
elem
- the DOM element for the schema.
public XmlSchema read(Element elem, String systemId)
elem
- xs:schema DOM element.systemId
- System id.
public XmlSchema read(InputSource inputSource)
inputSource
- the XSD document.
public XmlSchema read(Reader r)
public XmlSchema read(Source source)
source
- the XSD document.veh
- handler that is called back for validation.
public XmlSchema schemaForNamespace(String uri)
uri
- target namespace URI.
public void setBaseUri(String baseUri)
baseUri
- baseUri for this collection.public void setExtReg(ExtensionRegistry extReg)
public void setKnownNamespaceMap(Map<String,XmlSchema> knownNamespaceMap)
knownNamespaceMap
- a map of previously known XMLSchema objects keyed by their namespace (String)public void setNamespaceContext(NamespacePrefixList namespaceContext)
namespaceContext
- the context.public void setSchemaResolver(URIResolver schemaResolver)
schemaResolver
- resolverpublic String toString()
toString
in class Object
public XmlSchemaAttribute getAttributeByQName(QName schemaAttributeName)
schemaAttributeName
- the name of the attribute.
public XmlSchemaElement getElementByQName(QName qname)
qname
- the element QName.
public XmlSchemaAttributeGroup getAttributeGroupByQName(QName name)
public XmlSchemaGroup getGroupByQName(QName name)
public XmlSchemaNotation getNotationByQName(QName name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |