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.SchemaTreeCellRendereras a cell renderer for your tree.- Author:
- Kirill Grouchnikov (kirillcool@yahoo.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSchemaTreeTraverser.SchemaRootNodeThe root node of the schema hierarchy tree.static classSchemaTreeTraverser.SchemaTreeCellRendererSample cell renderer for the schema tree.static classSchemaTreeTraverser.SchemaTreeModelTree model for schema hierarchy tree.static classSchemaTreeTraverser.SchemaTreeNodeThe 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 ofthistraverser.- Returns:
- Tree model of
thistraverser.
-
visit
public void visit(XSSchemaSet s)
Visits the root schema set.- Parameters:
s- Root schema set.
-
attGroupDecl
public void attGroupDecl(XSAttGroupDecl decl)
- Specified by:
attGroupDeclin 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:
attributeUsein interfaceXSVisitor
-
attributeDecl
public void attributeDecl(XSAttributeDecl decl)
- Specified by:
attributeDeclin interfaceXSVisitor
-
simpleType
public void simpleType(XSSimpleType type)
- Specified by:
simpleTypein interfaceXSContentTypeVisitor
-
listSimpleType
public void listSimpleType(XSListSimpleType type)
- Specified by:
listSimpleTypein interfaceXSSimpleTypeVisitor
-
unionSimpleType
public void unionSimpleType(XSUnionSimpleType type)
- Specified by:
unionSimpleTypein interfaceXSSimpleTypeVisitor
-
restrictionSimpleType
public void restrictionSimpleType(XSRestrictionSimpleType type)
- Specified by:
restrictionSimpleTypein interfaceXSSimpleTypeVisitor
-
notation
public void notation(XSNotation notation)
-
complexType
public void complexType(XSComplexType type)
- Specified by:
complexTypein interfaceXSVisitor
-
elementDecl
public void elementDecl(XSElementDecl decl)
- Specified by:
elementDeclin interfaceXSTermVisitor
-
modelGroupDecl
public void modelGroupDecl(XSModelGroupDecl decl)
- Specified by:
modelGroupDeclin interfaceXSTermVisitor
-
modelGroup
public void modelGroup(XSModelGroup group)
- Specified by:
modelGroupin interfaceXSTermVisitor
-
particle
public void particle(XSParticle part)
- Specified by:
particlein interfaceXSContentTypeVisitor
-
wildcard
public void wildcard(XSWildcard wc)
- Specified by:
wildcardin interfaceXSTermVisitor
-
annotation
public void annotation(XSAnnotation ann)
- Specified by:
annotationin interfaceXSVisitor
-
empty
public void empty(XSContentType t)
- Specified by:
emptyin interfaceXSContentTypeVisitor
-
identityConstraint
public void identityConstraint(XSIdentityConstraint ic)
- Specified by:
identityConstraintin interfaceXSVisitor
-
-