public class XmlSchema extends XmlSchemaAnnotated implements NamespaceContextOwner
unhandledAttributes
Constructor and Description |
---|
XmlSchema()
Create a schema that is not a member of a collection.
|
XmlSchema(String namespace,
String systemId,
XmlSchemaCollection parent)
Create a new schema and record it as a member of a schema collection.
|
XmlSchema(String namespace,
XmlSchemaCollection parent) |
XmlSchema(XmlSchemaCollection parent)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addType(XmlSchemaType type) |
void |
compile(ValidationEventHandler eh) |
boolean |
equals(Object what)
Override the equals(Object) method with equivalence checking
that is specific to this class.
|
org.w3c.dom.Document[] |
getAllSchemas() |
XmlSchemaAttribute |
getAttributeByName(javax.xml.namespace.QName name)
Look for a global attribute by its QName.
|
protected XmlSchemaAttribute |
getAttributeByName(javax.xml.namespace.QName name,
boolean deep,
Stack schemaStack) |
XmlSchemaForm |
getAttributeFormDefault() |
XmlSchemaObjectTable |
getAttributeGroups() |
XmlSchemaObjectTable |
getAttributes() |
XmlSchemaDerivationMethod |
getBlockDefault() |
XmlSchemaElement |
getElementByName(javax.xml.namespace.QName name)
Look for a element by its qname.
|
protected XmlSchemaElement |
getElementByName(javax.xml.namespace.QName name,
boolean deep,
Stack schemaStack) |
XmlSchemaElement |
getElementByName(String name)
get an element by the name in the local schema
|
XmlSchemaForm |
getElementFormDefault() |
XmlSchemaObjectTable |
getElements() |
XmlSchemaDerivationMethod |
getFinalDefault() |
XmlSchemaObjectTable |
getGroups() |
XmlSchemaObjectCollection |
getIncludes() |
String |
getInputEncoding() |
XmlSchemaObjectCollection |
getItems() |
NamespacePrefixList |
getNamespaceContext()
Returns the objects namespace context.
|
XmlSchemaObjectTable |
getNotations() |
org.w3c.dom.Document |
getSchemaDocument()
Retrieve a DOM tree for this one schema, independent of any included or
related schemas.
|
XmlSchemaObjectTable |
getSchemaTypes() |
String |
getTargetNamespace() |
XmlSchemaType |
getTypeByName(javax.xml.namespace.QName name)
Search this schema and all the imported/included ones
for the given Qname
|
protected XmlSchemaType |
getTypeByName(javax.xml.namespace.QName name,
boolean deep,
Stack schemaStack)
Protected method that allows safe (non-recursive schema loading).
|
XmlSchemaType |
getTypeByName(String name)
Search this schema for a type by qname.
|
String |
getVersion() |
boolean |
isCompiled() |
void |
setAttributeFormDefault(XmlSchemaForm value) |
void |
setBlockDefault(XmlSchemaDerivationMethod blockDefault) |
void |
setElementFormDefault(XmlSchemaForm elementFormDefault) |
void |
setFinalDefault(XmlSchemaDerivationMethod finalDefault) |
void |
setInputEncoding(String encoding) |
void |
setNamespaceContext(NamespacePrefixList namespaceContext)
Sets the schema elements namespace context.
|
void |
setTargetNamespace(String targetNamespace) |
String |
toString() |
void |
write(OutputStream out)
Serialize the schema into the given output stream
|
void |
write(OutputStream out,
Map options)
Serialize the schema into the given output stream
|
void |
write(Writer writer)
Serialie the schema to a given writer
|
void |
write(Writer writer,
Map options)
Serialie the schema to a given writer
|
getAnnotation, getId, getUnhandledAttributes, setAnnotation, setId, setUnhandledAttributes
addMetaInfo, getLineNumber, getLinePosition, getMetaInfoMap, getSourceURI, setLineNumber, setLinePosition, setMetaInfoMap, setSourceURI, toString
public XmlSchema(XmlSchemaCollection parent)
XmlSchema(String, XmlSchemaCollection)
instead.parent
- the parent XmlSchemaCollectionpublic XmlSchema()
public XmlSchema(String namespace, String systemId, XmlSchemaCollection parent)
namespace
- the target namespace.systemId
- the system ID for the schema.parent
- the parent collection.public XmlSchema(String namespace, XmlSchemaCollection parent)
public void setInputEncoding(String encoding)
public XmlSchemaForm getAttributeFormDefault()
public void setAttributeFormDefault(XmlSchemaForm value)
public XmlSchemaObjectTable getAttributeGroups()
public XmlSchemaObjectTable getAttributes()
public XmlSchemaDerivationMethod getBlockDefault()
public void setBlockDefault(XmlSchemaDerivationMethod blockDefault)
public XmlSchemaForm getElementFormDefault()
public void setElementFormDefault(XmlSchemaForm elementFormDefault)
public XmlSchemaObjectTable getElements()
protected XmlSchemaElement getElementByName(javax.xml.namespace.QName name, boolean deep, Stack schemaStack)
protected XmlSchemaAttribute getAttributeByName(javax.xml.namespace.QName name, boolean deep, Stack schemaStack)
public XmlSchemaElement getElementByName(String name)
name
- public XmlSchemaElement getElementByName(javax.xml.namespace.QName name)
name
- public XmlSchemaAttribute getAttributeByName(javax.xml.namespace.QName name)
name
- protected XmlSchemaType getTypeByName(javax.xml.namespace.QName name, boolean deep, Stack schemaStack)
name
- deep
- schemaStack
- public XmlSchemaType getTypeByName(javax.xml.namespace.QName name)
name
- public XmlSchemaType getTypeByName(String name)
name
- public XmlSchemaDerivationMethod getFinalDefault()
public void setFinalDefault(XmlSchemaDerivationMethod finalDefault)
public XmlSchemaObjectTable getGroups()
public XmlSchemaObjectCollection getIncludes()
public boolean isCompiled()
public XmlSchemaObjectCollection getItems()
public XmlSchemaObjectTable getNotations()
public XmlSchemaObjectTable getSchemaTypes()
public String getTargetNamespace()
public void setTargetNamespace(String targetNamespace)
public String getVersion()
public void compile(ValidationEventHandler eh)
public void write(OutputStream out)
out
- - the output stream to write topublic void write(OutputStream out, Map options)
out
- - the output stream to write tooptions
- - a map of optionspublic void write(Writer writer, Map options)
writer
- - the writer to write thispublic void write(Writer writer)
writer
- - the writer to write thispublic org.w3c.dom.Document[] getAllSchemas()
public void addType(XmlSchemaType type)
public NamespacePrefixList getNamespaceContext()
NamespaceContextOwner
getNamespaceContext
in interface NamespaceContextOwner
public void setNamespaceContext(NamespacePrefixList namespaceContext)
public boolean equals(Object what)
equals
in class XmlSchemaObject
public org.w3c.dom.Document getSchemaDocument() throws XmlSchemaSerializer.XmlSchemaSerializerException
XmlSchemaSerializer.XmlSchemaSerializerException
public String getInputEncoding()
public String toString()
toString
in class XmlSchemaAnnotated
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.