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
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanIf IOException is encountered, this flag is set to true.private intindentation.private final Writeroutput is sent to this object.private static final XSWildcardFunction<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidannotation(XSAnnotation ann) voidattGroupDecl(XSAttGroupDecl decl) voidattributeDecl(XSAttributeDecl decl) voidbooleanFlush the stream and check its error state.voidcomplexType(XSComplexType type) private voiddump(XSAttributeDecl decl, String additionalAtts) private voidvoiddumpRef(XSAttGroupDecl decl) voidelementDecl(XSElementDecl decl) private voidelementDecl(XSElementDecl decl, String extraAtts) voidvoidvoidvoidvoidmodelGroup(XSModelGroup group) private voidmodelGroup(XSModelGroup group, String extraAtts) voidvoidnotation(XSNotation notation) voidparticle(XSParticle part) private voidprintln()private voidvoidvoidvoidsimpleType(XSSimpleType type) voidvoidvisit(XSSchemaSet s) voidwildcard(XSWildcard wc) private voidwildcard(String tagName, XSWildcard wc, String extraAtts) void
-
Field Details
-
out
output is sent to this object. -
indent
private int indentindentation. -
hadError
private boolean hadErrorIf IOException is encountered, this flag is set to true. -
WILDCARD_NS
-
-
Constructor Details
-
SchemaWriter
-
-
Method Details
-
println
-
println
private void println() -
checkError
public boolean checkError()Flush the stream and check its error state. -
visit
-
schema
-
attGroupDecl
- Specified by:
attGroupDeclin interfaceXSVisitor
-
dumpRef
-
attributeUse
- Specified by:
attributeUsein interfaceXSVisitor
-
attributeDecl
- Specified by:
attributeDeclin interfaceXSVisitor
-
dump
-
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
-
dumpComplexTypeAttribute
-
elementDecl
- Specified by:
elementDeclin interfaceXSTermVisitor
-
elementDecl
-
modelGroupDecl
- Specified by:
modelGroupDeclin interfaceXSTermVisitor
-
modelGroup
- Specified by:
modelGroupin interfaceXSTermVisitor
-
modelGroup
-
particle
- Specified by:
particlein interfaceXSContentTypeVisitor
-
wildcard
- Specified by:
wildcardin interfaceXSTermVisitor
-
wildcard
-
annotation
- Specified by:
annotationin interfaceXSVisitor
-
identityConstraint
- Specified by:
identityConstraintin interfaceXSVisitor
-
xpath
-
empty
- Specified by:
emptyin interfaceXSContentTypeVisitor
-