|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.schemagen.Tree
abstract class Tree
Normalized representation of the content model.
This is built from bottom up so that we can eliminate redundant constructs, and produce the most concise content model definition in XML.
Nested Class Summary | |
---|---|
(package private) static class |
Tree.Term
Represents a terminal tree node, such as element, wildcard, etc. |
Constructor Summary | |
---|---|
Tree()
|
Method Summary | |
---|---|
(package private) boolean |
canBeTopLevel()
Returns true if the top node of this tree can appear as a valid top-level content model in XML Schema. |
(package private) abstract boolean |
isNullable()
Returns true if this tree accepts empty sequence. |
(package private) static Tree |
makeGroup(GroupKind kind,
List<Tree> children)
Returns a group tree. |
(package private) Tree |
makeOptional(boolean really)
Returns "T?" from "T". |
(package private) Tree |
makeRepeated(boolean really)
Returns "T+" from "T". |
protected abstract void |
write(ContentModelContainer parent,
boolean isOptional,
boolean repeated)
Writes out the content model. |
protected void |
write(com.sun.xml.bind.v2.schemagen.xmlschema.TypeDefParticle ct)
Writes inside the given complex type. |
protected void |
writeOccurs(com.sun.xml.bind.v2.schemagen.xmlschema.Occurs o,
boolean isOptional,
boolean repeated)
Convenience method to write occurrence constraints. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
Tree()
Method Detail |
---|
Tree makeOptional(boolean really)
really
- if false this method becomes no-op. This is so that we can write
the caller fluently.Tree makeRepeated(boolean really)
really
- if false this method becomes no-op. This is so that we can write
the caller fluently.static Tree makeGroup(GroupKind kind, List<Tree> children)
abstract boolean isNullable()
boolean canBeTopLevel()
Model groups and occurrences that have model group in it can.
protected abstract void write(ContentModelContainer parent, boolean isOptional, boolean repeated)
protected void write(com.sun.xml.bind.v2.schemagen.xmlschema.TypeDefParticle ct)
protected final void writeOccurs(com.sun.xml.bind.v2.schemagen.xmlschema.Occurs o, boolean isOptional, boolean repeated)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |