|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ws.commons.schema.walker.XmlSchemaWalker
public final class XmlSchemaWalker
Walks an XmlSchema from a starting XmlSchemaElement,
notifying attached visitors as it descends.
| Constructor Summary | |
|---|---|
XmlSchemaWalker(XmlSchemaCollection xmlSchemas)
Initializes the XmlSchemaWalker with the
XmlScheamCollection to reference when following an
XmlSchemaElement. |
|
XmlSchemaWalker(XmlSchemaCollection xmlSchemas,
XmlSchemaVisitor visitor)
Initializes the XmlSchemaWalker with an
XmlSchemaVisitor to notify as the schema is walked. |
|
| Method Summary | |
|---|---|
XmlSchemaWalker |
addVisitor(XmlSchemaVisitor visitor)
Adds a new visitor to be notified as the XML Schemas are walked. |
void |
clear()
Clears the internal state in preparation for another walk through the schema. |
Set<QName> |
getUserRecognizedTypes()
The user-defined types set with the call to setUserRecognizedTypes(Set), or null if none. |
XmlSchemaWalker |
removeVisitor(XmlSchemaVisitor visitor)
Removes the visitor to be notified as the XML Schemas are walked. |
void |
setUserRecognizedTypes(Set<QName> userRecognizedTypes)
Defines the set of types the calling code recognizes. |
void |
walk(XmlSchemaElement element)
Initiates a walk through the XmlSchemaCollection starting with
the provided root XmlSchemaElement. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XmlSchemaWalker(XmlSchemaCollection xmlSchemas)
XmlSchemaWalker with the
XmlScheamCollection to reference when following an
XmlSchemaElement.
public XmlSchemaWalker(XmlSchemaCollection xmlSchemas,
XmlSchemaVisitor visitor)
XmlSchemaWalker with an
XmlSchemaVisitor to notify as the schema is walked.
(Other visitors may continue to be added after this one.)
xmlSchemas - The set of schemas to walk.visitor - The visitor to visit during the walk.| Method Detail |
|---|
public XmlSchemaWalker addVisitor(XmlSchemaVisitor visitor)
visitor - The visitor to be notified.
XmlSchemaWalker instance for method chaining.public XmlSchemaWalker removeVisitor(XmlSchemaVisitor visitor)
visitor - The visitor to remove.
XmlSchemaWalker instance for method chaining.public void clear()
public void setUserRecognizedTypes(Set<QName> userRecognizedTypes)
XmlSchemaTypeInfo that is passed to the
XmlSchemaVisitors, with lower types in the hierarchy taking
precedence over higher types.
This information is useful when translating from XML Schema to another schema, as this automatically associates the destination type with the source XML Schema type.
userRecognizedTypes - The set of types the user recognizes and would
like recognized when traversed.public Set<QName> getUserRecognizedTypes()
setUserRecognizedTypes(Set), or null if none.
public void walk(XmlSchemaElement element)
XmlSchemaCollection starting with
the provided root XmlSchemaElement. Any visitors will be notified
as the walk progresses.
Once this method completes, call clear() before starting another
walk through the XML Schemas.
element - The root element to start the walk from.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||