Package com.sun.xml.xsom.impl.util
Class SchemaTreeTraverser
java.lang.Object
com.sun.xml.xsom.impl.util.SchemaTreeTraverser
- All Implemented Interfaces:
XSContentTypeVisitor
,XSSimpleTypeVisitor
,XSTermVisitor
,XSVisitor
Generates approximated tree model for XML from a schema component. This is
not intended to be a fully-fledged round-trippable tree model.
Usage of this class
- Create a new instance.
- Call
visit(com.sun.xml.xsom.XSSchemaSet)
function on your schema set. - Retrieve the model using
getModel()
.
SchemaTreeTraverser.SchemaTreeNode
,
and the model itself is SchemaTreeTraverser.SchemaTreeModel
. You can
use SchemaTreeTraverser.SchemaTreeCellRenderer
as a cell renderer for
your tree.- Author:
- Kirill Grouchnikov (kirillcool@yahoo.com)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The root node of the schema hierarchy tree.static class
Sample cell renderer for the schema tree.static final class
Tree model for schema hierarchy tree.static class
The node of the schema hierarchy tree. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
annotation
(XSAnnotation ann) void
attGroupDecl
(XSAttGroupDecl decl) void
attributeDecl
(XSAttributeDecl decl) void
void
complexType
(XSComplexType type) void
dumpRef
(XSAttGroupDecl decl) Creates node of attribute group decalration reference.void
elementDecl
(XSElementDecl decl) void
void
getModel()
Retrieves the tree model ofthis
traverser.void
void
void
modelGroup
(XSModelGroup group) void
void
notation
(XSNotation notation) void
particle
(XSParticle part) void
void
void
simpleType
(XSSimpleType type) void
void
visit
(XSSchemaSet s) Visits the root schema set.void
wildcard
(XSWildcard wc) void
-
Constructor Details
-
SchemaTreeTraverser
public SchemaTreeTraverser()Simple constructor.
-
-
Method Details
-
getModel
Retrieves the tree model ofthis
traverser.- Returns:
- Tree model of
this
traverser.
-
visit
Visits the root schema set.- Parameters:
s
- Root schema set.
-
schema
-
attGroupDecl
- Specified by:
attGroupDecl
in interfaceXSVisitor
-
dumpRef
Creates node of attribute group decalration reference.- Parameters:
decl
- Attribute group decalration reference.
-
attributeUse
- Specified by:
attributeUse
in interfaceXSVisitor
-
attributeDecl
- Specified by:
attributeDecl
in interfaceXSVisitor
-
simpleType
- Specified by:
simpleType
in interfaceXSContentTypeVisitor
-
listSimpleType
- Specified by:
listSimpleType
in interfaceXSSimpleTypeVisitor
-
unionSimpleType
- Specified by:
unionSimpleType
in interfaceXSSimpleTypeVisitor
-
restrictionSimpleType
- Specified by:
restrictionSimpleType
in interfaceXSSimpleTypeVisitor
-
facet
-
notation
-
complexType
- Specified by:
complexType
in interfaceXSVisitor
-
elementDecl
- Specified by:
elementDecl
in interfaceXSTermVisitor
-
modelGroupDecl
- Specified by:
modelGroupDecl
in interfaceXSTermVisitor
-
modelGroup
- Specified by:
modelGroup
in interfaceXSTermVisitor
-
particle
- Specified by:
particle
in interfaceXSContentTypeVisitor
-
wildcard
- Specified by:
wildcard
in interfaceXSTermVisitor
-
annotation
- Specified by:
annotation
in interfaceXSVisitor
-
empty
- Specified by:
empty
in interfaceXSContentTypeVisitor
-
identityConstraint
- Specified by:
identityConstraint
in interfaceXSVisitor
-
xpath
-