SchemaParticle Interface
com.bea.xml
SchemaParticle Interface
- 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 SchemaParticle.ALL
, SchemaParticle.CHOICE
, SchemaParticle.SEQUENCE
,
SchemaParticle.ELEMENT
, or SchemaParticle.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.)
Related Topics
SchemaType.getContentModel()
public QNameSet |
-
acceptedStartNames ()
- Returns the QNameSet of element names that can be
accepted at the beginning of this particle.
|
public boolean |
-
canStartWithElement (QName name)
- True if this particle can start with the given element
(taking into account the structure of all child particles
of course).
|
public int |
-
countOfParticleChild ()
- The number of children.
|
public String |
-
getDefaultText ()
- For elements only: returns the default (or fixed) text value
|
public XmlAnySimpleType |
-
getDefaultValue ()
- For elements only: returns the default (or fixed) strongly-typed value
|
public 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.
|
public 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.
|
public BigInteger |
-
getMaxOccurs ()
- Returns the maxOccurs value for this particle, or null if it
is unbounded.
|
public BigInteger |
-
getMinOccurs ()
- Returns the minOccurs value for this particle.
|
public QName |
-
getName ()
- For elements only: the QName for the element use.
|
public SchemaParticle |
-
getParticleChild (int i)
- Another way to access the particle children.
|
public SchemaParticle [] |
-
getParticleChildren ()
- Applies to sequence, choice, and all particles only: returns an array
of all the particle children in order.
|
public int |
-
getParticleType ()
- Returns the particle type (
SchemaParticle.ALL , SchemaParticle.CHOICE ,
SchemaParticle.SEQUENCE , SchemaParticle.ELEMENT , or SchemaParticle.WILDCARD ).
|
public SchemaType |
-
getType ()
- For elements only: returns the type of the element.
|
public int |
-
getWildcardProcess ()
- For wildcards, returns the processing code (
SchemaParticle.STRICT , SchemaParticle.LAX , SchemaParticle.SKIP ).
|
public QNameSet |
-
getWildcardSet ()
- For wildcards, returns a QNameSet representing the wildcard.
|
public boolean |
-
isDefault ()
- For elements only: True if has default.
|
public boolean |
-
isFixed ()
- For elements only: true if is fixed value.
|
public boolean |
-
isNillable ()
- For elements only: true if nillable.
|
public boolean |
-
isSingleton ()
- One if minOccurs == maxOccurs == 1.
|
public 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)
|
ALL
public static final int ALL
- An xs:all group.
See
SchemaParticle.getParticleType()
.
CHOICE
public static final int CHOICE
- A xs:choice group.
See
SchemaParticle.getParticleType()
.
ELEMENT
public static final int ELEMENT
- An xs:element particle.
This code means the particle can be coerced to
SchemaLocalElement
.
See SchemaParticle.getParticleType()
.
LAX
public static final int LAX
- Lax wildcard processing. See
SchemaParticle.getWildcardProcess()
SEQUENCE
public static final int SEQUENCE
- A xs:sequence group.
See
SchemaParticle.getParticleType()
.
SKIP
public static final int SKIP
- Skip wildcard processing. See
SchemaParticle.getWildcardProcess()
STRICT
public static final int STRICT
- Strict wildcard processing. See
SchemaParticle.getWildcardProcess()
WILDCARD
public static final int WILDCARD
- An xs:any particle,
also known as an element wildcard.
See
SchemaParticle.getParticleType()
.
acceptedStartNames() Method
public QNameSet
acceptedStartNames()
Returns the QNameSet of element names that can be
accepted at the beginning of this particle.
canStartWithElement(QName) Method
public boolean canStartWithElement(QName
name)
True if this particle can start with the given element
(taking into account the structure of all child particles
of course).
countOfParticleChild() Method
public int countOfParticleChild()
The number of children.
getDefaultText() Method
public String
getDefaultText()
For elements only: returns the default (or fixed) text value
getDefaultValue() Method
public XmlAnySimpleType
getDefaultValue()
For elements only: returns the default (or fixed) strongly-typed value
getIntMaxOccurs() Method
public 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.
getIntMinOccurs() Method
public 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.
getMaxOccurs() Method
public 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.
getMinOccurs() Method
public BigInteger
getMinOccurs()
Returns the minOccurs value for this particle.
If it's not specified explicitly, this returns BigInteger.ONE.
getName() Method
public QName
getName()
For elements only: the QName for the element use.
May be unqualified version of referenced element's name.
getParticleChild(int) Method
public SchemaParticle
getParticleChild(int i)
Another way to access the particle children.
getParticleChildren() Method
public SchemaParticle
[] getParticleChildren()
Applies to sequence, choice, and all particles only: returns an array
of all the particle children in order.
getParticleType() Method
public int getParticleType()
Returns the particle type (SchemaParticle.ALL
, SchemaParticle.CHOICE
,
SchemaParticle.SEQUENCE
, SchemaParticle.ELEMENT
, or SchemaParticle.WILDCARD
).
getType() Method
public SchemaType
getType()
For elements only: returns the type of the element.
getWildcardProcess() Method
public int getWildcardProcess()
For wildcards, returns the processing code (SchemaParticle.STRICT
, SchemaParticle.LAX
, SchemaParticle.SKIP
).
getWildcardSet() Method
public QNameSet
getWildcardSet()
For wildcards, returns a QNameSet representing the wildcard.
isDefault() Method
public boolean isDefault()
For elements only: True if has default. If isFixed, then isDefault is always true.
isFixed() Method
public boolean isFixed()
For elements only: true if is fixed value.
isNillable() Method
public boolean isNillable()
For elements only: true if nillable.
isSingleton() Method
public boolean isSingleton()
One if minOccurs == maxOccurs == 1.
isSkippable() Method
public 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)