Package org.apache.xmlbeans
Interface SchemaParticle
- All Known Implementing Classes:
SchemaGlobalElementImpl,SchemaLocalElementImpl,SchemaParticleImpl
public interface SchemaParticle
Represents a Schema particle definition.
The content model of a complex type is a tree of particles. Each
particle is either an ALL, CHOICE, SEQUENCE,
ELEMENT, or WILDCARD.
All, choice and sequence particles are groups that can have child
particles; elements and wildcards are always leaves of the particle tree.
The tree of particles available on a schema type is minimized, that is, it already has removed "pointless" particles such as empty sequences, nonrepeating sequences with only one item, and so on. (Pointless particles are defined precisely in the XML Schema specification.)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAn xs:all group.static final intA xs:choice group.static final intAn xs:element particle.static final intLax wildcard processing.static final intA xs:sequence group.static final intSkip wildcard processing.static final intStrict wildcard processing.static final intAn xs:any particle, also known as an element wildcard. -
Method Summary
Modifier and TypeMethodDescriptionReturns the QNameSet of element names that can be accepted at the beginning of this particle.booleancanStartWithElement(QName name) True if this particle can start with the given element (taking into account the structure of all child particles of course).intThe number of children.For elements only: returns the default (or fixed) text valueFor elements only: returns the default (or fixed) strongly-typed valueReturns user specified documentationintReturns the maxOccurs value, pegged to a 32-bit int for convenience of a validating state machine that doesn't count higher than MAX_INT anyway.intReturns the minOccurs value, pegged to a 32-bit int for convenience of a validating state machine that doesn't count higher than MAX_INT anyway.Returns the maxOccurs value for this particle, or null if it is unbounded.Returns the minOccurs value for this particle.getName()For elements only: the QName for the element use.getParticleChild(int i) Another way to access the particle children.Applies to sequence, choice, and all particles only: returns an array of all the particle children in order.intgetType()For elements only: returns the type of the element.intFor wildcards, returns a QNameSet representing the wildcard.booleanFor elements only: True if has default.booleanisFixed()For elements only: true if is fixed value.booleanFor elements only: true if nillable.booleanOne if minOccurs == maxOccurs == 1.booleanTrue if this particle can be skipped (taking into account both the minOcurs as well as the structure of all the child particles)
-
Field Details
-
ALL
static final int ALLAn xs:all group. SeegetParticleType().- See Also:
-
CHOICE
static final int CHOICEA xs:choice group. SeegetParticleType().- See Also:
-
SEQUENCE
static final int SEQUENCEA xs:sequence group. SeegetParticleType().- See Also:
-
ELEMENT
static final int ELEMENTAn xs:element particle. This code means the particle can be coerced toSchemaLocalElement. SeegetParticleType().- See Also:
-
WILDCARD
static final int WILDCARDAn xs:any particle, also known as an element wildcard. SeegetParticleType().- See Also:
-
STRICT
static final int STRICTStrict wildcard processing. SeegetWildcardProcess()- See Also:
-
LAX
static final int LAXLax wildcard processing. SeegetWildcardProcess()- See Also:
-
SKIP
static final int SKIPSkip wildcard processing. SeegetWildcardProcess()- See Also:
-
-
Method Details
-
getParticleType
int getParticleType() -
getMinOccurs
BigInteger getMinOccurs()Returns the minOccurs value for this particle. If it's not specified explicitly, this returns BigInteger.ONE. -
getMaxOccurs
BigInteger getMaxOccurs()Returns the maxOccurs value for this particle, or null if it is unbounded. If it's not specified explicitly, this returns BigInteger.ONE. -
getIntMinOccurs
int getIntMinOccurs()Returns the minOccurs value, pegged to a 32-bit int for convenience of a validating state machine that doesn't count higher than MAX_INT anyway. -
getIntMaxOccurs
int getIntMaxOccurs()Returns the maxOccurs value, pegged to a 32-bit int for convenience of a validating state machine that doesn't count higher than MAX_INT anyway. Unbounded is given as MAX_INT. -
isSingleton
boolean isSingleton()One if minOccurs == maxOccurs == 1. -
getParticleChildren
SchemaParticle[] getParticleChildren()Applies to sequence, choice, and all particles only: returns an array of all the particle children in order. -
getParticleChild
Another way to access the particle children. -
countOfParticleChild
int countOfParticleChild()The number of children. -
canStartWithElement
True if this particle can start with the given element (taking into account the structure of all child particles of course). -
acceptedStartNames
QNameSet acceptedStartNames()Returns the QNameSet of element names that can be accepted at the beginning of this particle. -
isSkippable
boolean isSkippable()True if this particle can be skipped (taking into account both the minOcurs as well as the structure of all the child particles) -
getWildcardSet
QNameSet getWildcardSet()For wildcards, returns a QNameSet representing the wildcard. -
getWildcardProcess
int getWildcardProcess() -
getName
QName getName()For elements only: the QName for the element use. May be unqualified version of referenced element's name. -
getType
SchemaType getType()For elements only: returns the type of the element. -
isNillable
boolean isNillable()For elements only: true if nillable. -
getDefaultText
String getDefaultText()For elements only: returns the default (or fixed) text value -
getDefaultValue
XmlAnySimpleType getDefaultValue()For elements only: returns the default (or fixed) strongly-typed value -
isDefault
boolean isDefault()For elements only: True if has default. If isFixed, then isDefault is always true. -
isFixed
boolean isFixed()For elements only: true if is fixed value. -
getDocumentation
String getDocumentation()Returns user specified documentation<xs:element ... > <xs:annotation> <xs:documentation> getDocumentation method will return whatever stuff here. </xs:documentation> </xs:annotation> </xs:element>
-