Package com.sun.xml.xsom.impl.util
Class SchemaWriter
- java.lang.Object
-
- com.sun.xml.xsom.impl.util.SchemaWriter
-
- All Implemented Interfaces:
XSContentTypeVisitor,XSSimpleTypeVisitor,XSTermVisitor,XSVisitor
public class SchemaWriter extends Object implements XSVisitor, XSSimpleTypeVisitor
Generates approximated XML Schema representation from a schema component. This is not intended to be a fully-fledged round-trippable schema writer.Usage of this class
- Create a new instance with whatever Writer you'd like to send the output to.
- Call one of the overloaded dump methods. You can repeat this process as many times as you want.
- Author:
- Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com), Kirill Grouchnikov (kirillcool@yahoo.com)
-
-
Constructor Summary
Constructors Constructor Description SchemaWriter(Writer _out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidannotation(XSAnnotation ann)voidattGroupDecl(XSAttGroupDecl decl)voidattributeDecl(XSAttributeDecl decl)voidattributeUse(XSAttributeUse use)booleancheckError()Flush the stream and check its error state.voidcomplexType(XSComplexType type)voiddumpRef(XSAttGroupDecl decl)voidelementDecl(XSElementDecl decl)voidempty(XSContentType t)voidfacet(XSFacet facet)voididentityConstraint(XSIdentityConstraint decl)voidlistSimpleType(XSListSimpleType type)voidmodelGroup(XSModelGroup group)voidmodelGroupDecl(XSModelGroupDecl decl)voidnotation(XSNotation notation)voidparticle(XSParticle part)voidrestrictionSimpleType(XSRestrictionSimpleType type)voidschema(XSSchema s)voidsimpleType(XSSimpleType type)voidunionSimpleType(XSUnionSimpleType type)voidvisit(XSSchemaSet s)voidwildcard(XSWildcard wc)voidxpath(XSXPath xp)
-
-
-
Constructor Detail
-
SchemaWriter
public SchemaWriter(Writer _out)
-
-
Method Detail
-
checkError
public boolean checkError()
Flush the stream and check its error state.
-
visit
public void visit(XSSchemaSet s)
-
attGroupDecl
public void attGroupDecl(XSAttGroupDecl decl)
- Specified by:
attGroupDeclin interfaceXSVisitor
-
dumpRef
public void dumpRef(XSAttGroupDecl decl)
-
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
-
identityConstraint
public void identityConstraint(XSIdentityConstraint decl)
- Specified by:
identityConstraintin interfaceXSVisitor
-
empty
public void empty(XSContentType t)
- Specified by:
emptyin interfaceXSContentTypeVisitor
-
-