Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlbeans
Interface SchemaParticle

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:
  `SchemaType.getContentModel()`

Field Summary
`static int` | `ALL` An xs:all group.
`static int` | `CHOICE` A xs:choice group.
`static int` | `ELEMENT` An xs:element particle.
`static int` | `LAX` Lax wildcard processing.
`static int` | `SEQUENCE` A xs:sequence group.
`static int` | `SKIP` Skip wildcard processing.
`static int` | `STRICT` Strict wildcard processing.
`static int` | `WILDCARD` An xs:any particle, also known as an element wildcard.

Method Summary
`QNameSet` | `acceptedStartNames()` Returns the QNameSet of element names that can be accepted at the beginning of this particle.
`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).
`int` | `countOfParticleChild()` The number of children.
`String` | `getDefaultText()` For elements only: returns the default (or fixed) text value
`XmlAnySimpleType` | `getDefaultValue()` For elements only: returns the default (or fixed) strongly-typed value
`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.
`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.
`BigInteger` | `getMaxOccurs()` Returns the maxOccurs value for this particle, or null if it is unbounded.
`BigInteger` | `getMinOccurs()` Returns the minOccurs value for this particle.
`QName` | `getName()` For elements only: the QName for the element use.
`SchemaParticle` | `getParticleChild(int i)` Another way to access the particle children.
`SchemaParticle[]` | `getParticleChildren()` Applies to sequence, choice, and all particles only: returns an array of all the particle children in order.
`int` | `getParticleType()` Returns the particle type (`ALL`, `CHOICE`, `SEQUENCE`, `ELEMENT`, or `WILDCARD`).
`SchemaType` | `getType()` For elements only: returns the type of the element.
`int` | `getWildcardProcess()` For wildcards, returns the processing code (`STRICT`, `LAX`, `SKIP`).
`QNameSet` | `getWildcardSet()` For wildcards, returns a QNameSet representing the wildcard.
`boolean` | `isDefault()` For elements only: True if has default.
`boolean` | `isFixed()` For elements only: true if is fixed value.
`boolean` | `isNillable()` For elements only: true if nillable.
`boolean` | `isSingleton()` One if minOccurs == maxOccurs == 1.
`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)

Field Detail

### ALL

    public static final int ALL

  An xs:all group. See `getParticleType()`.

  See Also:
    Constant Field Values

### CHOICE

    public static final int CHOICE

  A xs:choice group. See `getParticleType()`.

  See Also:
    Constant Field Values

### SEQUENCE

    public static final int SEQUENCE

  A xs:sequence group. See `getParticleType()`.

  See Also:
    Constant Field Values

### ELEMENT

    public static final int ELEMENT

  An xs:element particle. This code means the particle can be coerced to `SchemaLocalElement`. See `getParticleType()`.

  See Also:
    Constant Field Values

### WILDCARD

    public static final int WILDCARD

  An xs:any particle, also known as an element wildcard. See `getParticleType()`.

  See Also:
    Constant Field Values

### STRICT

    public static final int STRICT

  Strict wildcard processing. See `getWildcardProcess()`

  See Also:
    Constant Field Values

### LAX

    public static final int LAX

  Lax wildcard processing. See `getWildcardProcess()`

  See Also:
    Constant Field Values

### SKIP

    public static final int SKIP

  Skip wildcard processing. See `getWildcardProcess()`

  See Also:
    Constant Field Values

Method Detail

### getParticleType

    public int getParticleType()

  Returns the particle type (`ALL`, `CHOICE`, `SEQUENCE`, `ELEMENT`, or `WILDCARD`).

### getMinOccurs

    public BigInteger getMinOccurs()

  Returns the minOccurs value for this particle. If it's not specified explicitly, this returns BigInteger.ONE.

### getMaxOccurs

    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.

### getIntMinOccurs

    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.

### getIntMaxOccurs

    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.

### isSingleton

    public boolean isSingleton()

  One if minOccurs == maxOccurs == 1.

### getParticleChildren

    public SchemaParticle[] getParticleChildren()

  Applies to sequence, choice, and all particles only: returns an array of all the particle children in order.

### getParticleChild

    public SchemaParticle getParticleChild(int i)

  Another way to access the particle children.

### countOfParticleChild

    public int countOfParticleChild()

  The number of children.

### canStartWithElement

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

### acceptedStartNames

    public QNameSet acceptedStartNames()

  Returns the QNameSet of element names that can be accepted at the beginning of this particle.

### isSkippable

    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)

### getWildcardSet

    public QNameSet getWildcardSet()

  For wildcards, returns a QNameSet representing the wildcard.

### getWildcardProcess

    public int getWildcardProcess()

  For wildcards, returns the processing code (`STRICT`, `LAX`, `SKIP`).

### getName

    public QName getName()

  For elements only: the QName for the element use. May be unqualified version of referenced element's name.

### getType

    public SchemaType getType()

  For elements only: returns the type of the element.

### isNillable

    public boolean isNillable()

  For elements only: true if nillable.

### getDefaultText

    public String getDefaultText()

  For elements only: returns the default (or fixed) text value

### getDefaultValue

    public XmlAnySimpleType getDefaultValue()

  For elements only: returns the default (or fixed) strongly-typed value

### isDefault

    public boolean isDefault()

  For elements only: True if has default. If isFixed, then isDefault is always true.

### isFixed

    public boolean isFixed()

  For elements only: true if is fixed value.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD