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

  1. Create a new instance.
  2. Call visit(com.sun.xml.xsom.XSSchemaSet) function on your schema set.
  3. Retrieve the model using getModel().
Every node in the resulting tree is a 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)