Top Description Inners Constructors Methods
org.glassfish.jaxb.runtime.v2.schemagen

pack-priv abstract Class Tree

extends Object
Class Inheritance
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.schemagen.Tree.Term, org.glassfish.jaxb.runtime.v2.schemagen.Tree.Optional, org.glassfish.jaxb.runtime.v2.schemagen.Tree.Repeated, org.glassfish.jaxb.runtime.v2.schemagen.Tree.Group
Imports
org.glassfish.jaxb.runtime.v2.schemagen.xmlschema.ContentModelContainer, .Occurs, .Particle, .TypeDefParticle, java.util.ArrayList, .Arrays, .List

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.

Author
Kohsuke Kawaguchi

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
Tree.Group

"S|T", "S,T", and "S&T".

private static class
private static class
pack-priv abstract static class
Tree.Term

Represents a terminal tree node, such as element, wildcard, etc.

Constructor Summary

AccessConstructor and Description
pack-priv
Tree()

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
canBeTopLevel()

Returns true if the top node of this tree can appear as a valid top-level content model in XML Schema.

pack-priv abstract boolean
isNullable()

Returns true if this tree accepts empty sequence.

pack-priv static Tree
makeGroup(GroupKind kind, List<Tree> children)

Returns a group tree.

pack-priv Tree
makeOptional(boolean
if false this method becomes no-op. This is so that we can write the caller fluently.
really
)

Returns "T?" from "T".

pack-priv Tree
makeRepeated(boolean
if false this method becomes no-op. This is so that we can write the caller fluently.
really
)

Returns "T+" from "T".

protected abstract void
write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Writes out the content model.

protected void
write(TypeDefParticle ct)

Writes inside the given complex type.

protected final void
writeOccurs(Occurs o, boolean isOptional, boolean repeated)

Convenience method to write occurrence constraints.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Treeback to summary
pack-priv Tree()

Method Detail

canBeTopLevelback to summary
pack-priv boolean canBeTopLevel()

Returns true if the top node of this tree can appear as a valid top-level content model in XML Schema.

Model groups and occurrences that have model group in it can.

isNullableback to summary
pack-priv abstract boolean isNullable()

Returns true if this tree accepts empty sequence.

makeGroupback to summary
pack-priv static Tree makeGroup(GroupKind kind, List<Tree> children)

Returns a group tree.

makeOptionalback to summary
pack-priv Tree makeOptional(boolean really)

Returns "T?" from "T".

Parameters
really:boolean

if false this method becomes no-op. This is so that we can write the caller fluently.

makeRepeatedback to summary
pack-priv Tree makeRepeated(boolean really)

Returns "T+" from "T".

Parameters
really:boolean

if false this method becomes no-op. This is so that we can write the caller fluently.

writeback to summary
protected abstract void write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Writes out the content model. Normall this runs recursively until we write out the whole content model.

writeback to summary
protected void write(TypeDefParticle ct)

Writes inside the given complex type.

writeOccursback to summary
protected final void writeOccurs(Occurs o, boolean isOptional, boolean repeated)

Convenience method to write occurrence constraints.

org.glassfish.jaxb.runtime.v2.schemagen back to summary

private final Class Tree.Group

extends Tree
Class Inheritance

"S|T", "S,T", and "S&T".

Field Summary

Modifier and TypeField and Description
private final Tree[]
private final GroupKind

Constructor Summary

AccessConstructor and Description
private
Group(GroupKind kind, Tree... children)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
canBeTopLevel()

Overrides org.glassfish.jaxb.runtime.v2.schemagen.Tree.canBeTopLevel.

Returns true if the top node of this tree can appear as a valid top-level content model in XML Schema.

pack-priv boolean
isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

protected void
write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Writes out the content model.

Inherited from org.glassfish.jaxb.runtime.v2.schemagen.Tree:
makeGroupmakeOptionalmakeRepeatedwritewriteOccurs

Field Detail

childrenback to summary
private final Tree[] children
kindback to summary
private final GroupKind kind

Constructor Detail

Groupback to summary
private Group(GroupKind kind, Tree... children)

Method Detail

canBeTopLevelback to summary
pack-priv boolean canBeTopLevel()

Overrides org.glassfish.jaxb.runtime.v2.schemagen.Tree.canBeTopLevel.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.canBeTopLevel.

Returns true if the top node of this tree can appear as a valid top-level content model in XML Schema.

Model groups and occurrences that have model group in it can.

Annotations
@Override
isNullableback to summary
pack-priv boolean isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

Annotations
@Override
writeback to summary
protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Writes out the content model. Normall this runs recursively until we write out the whole content model.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.schemagen back to summary

private final Class Tree.Optional

extends Tree
Class Inheritance

"T?"

Field Summary

Modifier and TypeField and Description
private final Tree

Constructor Summary

AccessConstructor and Description
private
Optional(Tree body)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

pack-priv Tree
makeOptional(boolean really)

Overrides org.glassfish.jaxb.runtime.v2.schemagen.Tree.makeOptional.

Returns "T?" from "T".

protected void
write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Writes out the content model.

Inherited from org.glassfish.jaxb.runtime.v2.schemagen.Tree:
canBeTopLevelmakeGroupmakeRepeatedwritewriteOccurs

Field Detail

bodyback to summary
private final Tree body

Constructor Detail

Optionalback to summary
private Optional(Tree body)

Method Detail

isNullableback to summary
pack-priv boolean isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

Annotations
@Override
makeOptionalback to summary
pack-priv Tree makeOptional(boolean really)

Overrides org.glassfish.jaxb.runtime.v2.schemagen.Tree.makeOptional.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.makeOptional.

Returns "T?" from "T".

Annotations
@Override
writeback to summary
protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Writes out the content model. Normall this runs recursively until we write out the whole content model.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.schemagen back to summary

private final Class Tree.Repeated

extends Tree
Class Inheritance

"T+"

Field Summary

Modifier and TypeField and Description
private final Tree

Constructor Summary

AccessConstructor and Description
private
Repeated(Tree body)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

pack-priv Tree
makeRepeated(boolean really)

Overrides org.glassfish.jaxb.runtime.v2.schemagen.Tree.makeRepeated.

Returns "T+" from "T".

protected void
write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Writes out the content model.

Inherited from org.glassfish.jaxb.runtime.v2.schemagen.Tree:
canBeTopLevelmakeGroupmakeOptionalwritewriteOccurs

Field Detail

bodyback to summary
private final Tree body

Constructor Detail

Repeatedback to summary
private Repeated(Tree body)

Method Detail

isNullableback to summary
pack-priv boolean isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

Annotations
@Override
makeRepeatedback to summary
pack-priv Tree makeRepeated(boolean really)

Overrides org.glassfish.jaxb.runtime.v2.schemagen.Tree.makeRepeated.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.makeRepeated.

Returns "T+" from "T".

Annotations
@Override
writeback to summary
protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated)

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.write.

Writes out the content model. Normall this runs recursively until we write out the whole content model.

Annotations
@Override
org.glassfish.jaxb.runtime.v2.schemagen back to summary

pack-priv abstract Class Tree.Term

extends Tree
Class Inheritance

Represents a terminal tree node, such as element, wildcard, etc.

Constructor Summary

AccessConstructor and Description
pack-priv
Term()

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

Inherited from org.glassfish.jaxb.runtime.v2.schemagen.Tree:
canBeTopLevelmakeGroupmakeOptionalmakeRepeatedwritewritewriteOccurs

Constructor Detail

Termback to summary
pack-priv Term()

Method Detail

isNullableback to summary
pack-priv boolean isNullable()

Implements abstract org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Doc from org.glassfish.jaxb.runtime.v2.schemagen.Tree.isNullable.

Returns true if this tree accepts empty sequence.

Annotations
@Override