Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]
org.apache.xmlbeans
public interface: SchemaParticle [javadoc | source]

All Known Implementing Classes:
    SchemaLocalElementImpl, SchemaParticleImpl, SchemaGlobalElementImpl

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.)

Field Summary
static final  int ALL    An xs:all group. See #getParticleType
static final  int CHOICE    A xs:choice group. See #getParticleType
static final  int SEQUENCE    A xs:sequence group. See #getParticleType
static final  int ELEMENT    An xs:element particle. This code means the particle can be coerced to SchemaLocalElement . See #getParticleType
static final  int WILDCARD    An xs:any particle, also known as an element wildcard. See #getParticleType
static final  int STRICT    Strict wildcard processing. See #getWildcardProcess  
static final  int LAX    Lax wildcard processing. See #getWildcardProcess  
static final  int SKIP    Skip wildcard processing. See #getWildcardProcess  
Method from org.apache.xmlbeans.SchemaParticle Summary:
acceptedStartNames,   canStartWithElement,   countOfParticleChild,   getDefaultText,   getDefaultValue,   getIntMaxOccurs,   getIntMinOccurs,   getMaxOccurs,   getMinOccurs,   getName,   getParticleChild,   getParticleChildren,   getParticleType,   getType,   getWildcardProcess,   getWildcardSet,   isDefault,   isFixed,   isNillable,   isSingleton,   isSkippable
Method from org.apache.xmlbeans.SchemaParticle Detail:
 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. Unbounded is given as MAX_INT.
 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. If it's not specified explicitly, this returns BigInteger.ONE.
 public BigInteger getMinOccurs()
    Returns the minOccurs value for this particle. If it's not specified explicitly, this returns BigInteger.ONE.
 public QName getName()
    For elements only: the QName for the element use. May be unqualified version of referenced element's name.
 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()
 public SchemaType getType()
    For elements only: returns the type of the element.
 public int getWildcardProcess()
 public QNameSet getWildcardSet()
    For wildcards, returns a QNameSet representing the wildcard.
 public boolean isDefault()
    For elements only: True if has default. If isFixed, then isDefault is always true.
 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)