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
Nested ClassesModifier and TypeClassDescriptionstatic classThe root node of the schema hierarchy tree.static classSample cell renderer for the schema tree.static final classTree model for schema hierarchy tree.static classThe node of the schema hierarchy tree. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidannotation(XSAnnotation ann) voidattGroupDecl(XSAttGroupDecl decl) voidattributeDecl(XSAttributeDecl decl) voidvoidcomplexType(XSComplexType type) voiddumpRef(XSAttGroupDecl decl) Creates node of attribute group decalration reference.voidelementDecl(XSElementDecl decl) voidvoidgetModel()Retrieves the tree model ofthistraverser.voidvoidvoidmodelGroup(XSModelGroup group) voidvoidnotation(XSNotation notation) voidparticle(XSParticle part) voidvoidvoidsimpleType(XSSimpleType type) voidvoidvisit(XSSchemaSet s) Visits the root schema set.voidwildcard(XSWildcard wc) void
-
Constructor Details
-
SchemaTreeTraverser
public SchemaTreeTraverser()Simple constructor.
-
-
Method Details
-
getModel
Retrieves the tree model ofthistraverser.- Returns:
- Tree model of
thistraverser.
-
visit
Visits the root schema set.- Parameters:
s- Root schema set.
-
schema
-
attGroupDecl
- Specified by:
attGroupDeclin interfaceXSVisitor
-
dumpRef
Creates node of attribute group decalration reference.- Parameters:
decl- Attribute group decalration reference.
-
attributeUse
- Specified by:
attributeUsein interfaceXSVisitor
-
attributeDecl
- Specified by:
attributeDeclin interfaceXSVisitor
-
simpleType
- Specified by:
simpleTypein interfaceXSContentTypeVisitor
-
listSimpleType
- Specified by:
listSimpleTypein interfaceXSSimpleTypeVisitor
-
unionSimpleType
- Specified by:
unionSimpleTypein interfaceXSSimpleTypeVisitor
-
restrictionSimpleType
- Specified by:
restrictionSimpleTypein interfaceXSSimpleTypeVisitor
-
facet
-
notation
-
complexType
- Specified by:
complexTypein interfaceXSVisitor
-
elementDecl
- Specified by:
elementDeclin interfaceXSTermVisitor
-
modelGroupDecl
- Specified by:
modelGroupDeclin interfaceXSTermVisitor
-
modelGroup
- Specified by:
modelGroupin interfaceXSTermVisitor
-
particle
- Specified by:
particlein interfaceXSContentTypeVisitor
-
wildcard
- Specified by:
wildcardin interfaceXSTermVisitor
-
annotation
- Specified by:
annotationin interfaceXSVisitor
-
empty
- Specified by:
emptyin interfaceXSContentTypeVisitor
-
identityConstraint
- Specified by:
identityConstraintin interfaceXSVisitor
-
xpath
-