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
public class SchemaTreeTraverser extends Object implements XSVisitor, XSSimpleTypeVisitor
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(XSSchemaSet)
function on your schema set. - Retrieve the model using
getModel()
.
SchemaTreeTraverser.SchemaTreeNode
, and the model itself isSchemaTreeTraverser.SchemaTreeModel
. You can useSchemaTreeTraverser.SchemaTreeCellRenderer
as a cell renderer for your tree.- Author:
- Kirill Grouchnikov (kirillcool@yahoo.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SchemaTreeTraverser.SchemaRootNode
The root node of the schema hierarchy tree.static class
SchemaTreeTraverser.SchemaTreeCellRenderer
Sample cell renderer for the schema tree.static class
SchemaTreeTraverser.SchemaTreeModel
Tree model for schema hierarchy tree.static class
SchemaTreeTraverser.SchemaTreeNode
The node of the schema hierarchy tree.
-
Constructor Summary
Constructors Constructor Description SchemaTreeTraverser()
Simple constructor.
-
Method Summary
-
-
-
Method Detail
-
getModel
public SchemaTreeTraverser.SchemaTreeModel getModel()
Retrieves the tree model ofthis
traverser.- Returns:
- Tree model of
this
traverser.
-
visit
public void visit(XSSchemaSet s)
Visits the root schema set.- Parameters:
s
- Root schema set.
-
attGroupDecl
public void attGroupDecl(XSAttGroupDecl decl)
- Specified by:
attGroupDecl
in interfaceXSVisitor
-
dumpRef
public void dumpRef(XSAttGroupDecl decl)
Creates node of attribute group decalration reference.- Parameters:
decl
- Attribute group decalration reference.
-
attributeUse
public void attributeUse(XSAttributeUse use)
- Specified by:
attributeUse
in interfaceXSVisitor
-
attributeDecl
public void attributeDecl(XSAttributeDecl decl)
- Specified by:
attributeDecl
in interfaceXSVisitor
-
simpleType
public void simpleType(XSSimpleType type)
- Specified by:
simpleType
in interfaceXSContentTypeVisitor
-
listSimpleType
public void listSimpleType(XSListSimpleType type)
- Specified by:
listSimpleType
in interfaceXSSimpleTypeVisitor
-
unionSimpleType
public void unionSimpleType(XSUnionSimpleType type)
- Specified by:
unionSimpleType
in interfaceXSSimpleTypeVisitor
-
restrictionSimpleType
public void restrictionSimpleType(XSRestrictionSimpleType type)
- Specified by:
restrictionSimpleType
in interfaceXSSimpleTypeVisitor
-
notation
public void notation(XSNotation notation)
-
complexType
public void complexType(XSComplexType type)
- Specified by:
complexType
in interfaceXSVisitor
-
elementDecl
public void elementDecl(XSElementDecl decl)
- Specified by:
elementDecl
in interfaceXSTermVisitor
-
modelGroupDecl
public void modelGroupDecl(XSModelGroupDecl decl)
- Specified by:
modelGroupDecl
in interfaceXSTermVisitor
-
modelGroup
public void modelGroup(XSModelGroup group)
- Specified by:
modelGroup
in interfaceXSTermVisitor
-
particle
public void particle(XSParticle part)
- Specified by:
particle
in interfaceXSContentTypeVisitor
-
wildcard
public void wildcard(XSWildcard wc)
- Specified by:
wildcard
in interfaceXSTermVisitor
-
annotation
public void annotation(XSAnnotation ann)
- Specified by:
annotation
in interfaceXSVisitor
-
empty
public void empty(XSContentType t)
- Specified by:
empty
in interfaceXSContentTypeVisitor
-
identityConstraint
public void identityConstraint(XSIdentityConstraint ic)
- Specified by:
identityConstraint
in interfaceXSVisitor
-
-