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 boolean
If IOException is encountered, this flag is set to true.private int
indentation.private final Writer
output is sent to this object.private static final XSWildcardFunction
<String> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
annotation
(XSAnnotation ann) void
attGroupDecl
(XSAttGroupDecl decl) void
attributeDecl
(XSAttributeDecl decl) void
boolean
Flush the stream and check its error state.void
complexType
(XSComplexType type) private void
dump
(XSAttributeDecl decl, String additionalAtts) private void
void
dumpRef
(XSAttGroupDecl decl) void
elementDecl
(XSElementDecl decl) private void
elementDecl
(XSElementDecl decl, String extraAtts) void
void
void
void
void
modelGroup
(XSModelGroup group) private void
modelGroup
(XSModelGroup group, String extraAtts) void
void
notation
(XSNotation notation) void
particle
(XSParticle part) private void
println()
private void
void
void
void
simpleType
(XSSimpleType type) void
void
visit
(XSSchemaSet s) void
wildcard
(XSWildcard wc) private void
wildcard
(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:
attGroupDecl
in interfaceXSVisitor
-
dumpRef
-
attributeUse
- Specified by:
attributeUse
in interfaceXSVisitor
-
attributeDecl
- Specified by:
attributeDecl
in interfaceXSVisitor
-
dump
-
simpleType
- Specified by:
simpleType
in interfaceXSContentTypeVisitor
-
listSimpleType
- Specified by:
listSimpleType
in interfaceXSSimpleTypeVisitor
-
unionSimpleType
- Specified by:
unionSimpleType
in interfaceXSSimpleTypeVisitor
-
restrictionSimpleType
- Specified by:
restrictionSimpleType
in interfaceXSSimpleTypeVisitor
-
facet
-
notation
-
complexType
- Specified by:
complexType
in interfaceXSVisitor
-
dumpComplexTypeAttribute
-
elementDecl
- Specified by:
elementDecl
in interfaceXSTermVisitor
-
elementDecl
-
modelGroupDecl
- Specified by:
modelGroupDecl
in interfaceXSTermVisitor
-
modelGroup
- Specified by:
modelGroup
in interfaceXSTermVisitor
-
modelGroup
-
particle
- Specified by:
particle
in interfaceXSContentTypeVisitor
-
wildcard
- Specified by:
wildcard
in interfaceXSTermVisitor
-
wildcard
-
annotation
- Specified by:
annotation
in interfaceXSVisitor
-
identityConstraint
- Specified by:
identityConstraint
in interfaceXSVisitor
-
xpath
-
empty
- Specified by:
empty
in interfaceXSContentTypeVisitor
-