org.apache.xmlbeans.impl.schema

## Class SchemaParticleImpl

- java.lang.Object
- - org.apache.xmlbeans.impl.schema.SchemaParticleImpl

All Implemented Interfaces:
  SchemaParticle

Direct Known Subclasses:
  SchemaLocalElementImpl

    public class SchemaParticleImpl
    extends Object
    implements SchemaParticle

### Field Summary

Fields
`protected XmlObject` `_parseObject`

### Fields inherited from interface org.apache.xmlbeans.SchemaParticle

`ALL, CHOICE, ELEMENT, LAX, SEQUENCE, SKIP, STRICT, WILDCARD`

### Constructor Summary

Constructors
Constructor and Description
`SchemaParticleImpl()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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
`String` `getDocumentation()` Returns user specified documentation
`QNameSet` `getExcludeNextSet()`
`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 (`SchemaParticle.ALL`, `SchemaParticle.CHOICE`, `SchemaParticle.SEQUENCE`, `SchemaParticle.ELEMENT`, or `SchemaParticle.WILDCARD`).
`SchemaType` `getType()` For elements only: returns the type of the element.
`Object` `getUserData()`
`int` `getWildcardProcess()` For wildcards, returns the processing code (`SchemaParticle.STRICT`, `SchemaParticle.LAX`, `SchemaParticle.SKIP`).
`QNameSet` `getWildcardSet()` For wildcards, returns a QNameSet representing the wildcard.
`boolean` `hasTransitionNotes()`
`boolean` `hasTransitionRules()`
`boolean` `isAttribute()`
`boolean` `isDefault()` For elements only: True if has default.
`boolean` `isDeterministic()`
`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)
`boolean` `isTypeResolved()`
`protected void` `mutate()`
`void` `resolveTypeRef(SchemaType.Ref typeref)`
`void` `setDefault(String deftext, boolean isFixed, XmlObject parseObject)`
`void` `setDefaultValue(XmlValueRef defaultRef)`
`void` `setImmutable()`
`void` `setMaxOccurs(BigInteger max)`
`void` `setMinOccurs(BigInteger min)`
`void` `setNameAndTypeRef(QName formname, SchemaType.Ref typeref)`
`void` `setNillable(boolean nillable)`
`void` `setParticleChildren(SchemaParticle[] children)`
`void` `setParticleType(int pType)`
`void` `setTransitionNotes(QNameSet excludeNext, boolean isDeterministic)`
`void` `setTransitionRules(QNameSet start, boolean isSkippable)`
`void` `setUserData(Object data)`
`void` `setWildcardProcess(int process)`
`void` `setWildcardSet(QNameSet set)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _parseObject

    protected XmlObject _parseObject

### Constructor Detail

#### SchemaParticleImpl

    public SchemaParticleImpl()

### Method Detail

#### mutate

    protected void mutate()

#### setImmutable

    public void setImmutable()

#### hasTransitionRules

    public boolean hasTransitionRules()

#### hasTransitionNotes

    public boolean hasTransitionNotes()

#### setTransitionRules

    public void setTransitionRules(QNameSet start,
                                   boolean isSkippable)

#### setTransitionNotes

    public void setTransitionNotes(QNameSet excludeNext,
                                   boolean isDeterministic)

#### canStartWithElement

    public boolean canStartWithElement(QName name)

Description copied from interface: `SchemaParticle`
True if this particle can start with the given element (taking into account the structure of all child particles of course).

Specified by:
  `canStartWithElement` in interface `SchemaParticle`

#### acceptedStartNames

    public QNameSet acceptedStartNames()

Description copied from interface: `SchemaParticle`
Returns the QNameSet of element names that can be accepted at the beginning of this particle.

Specified by:
  `acceptedStartNames` in interface `SchemaParticle`

#### getExcludeNextSet

    public QNameSet getExcludeNextSet()

#### isSkippable

    public boolean isSkippable()

Description copied from interface: `SchemaParticle`
True if this particle can be skipped (taking into account both the minOcurs as well as the structure of all the child particles)

Specified by:
  `isSkippable` in interface `SchemaParticle`

#### isDeterministic

    public boolean isDeterministic()

#### getParticleType

    public int getParticleType()

Description copied from interface: `SchemaParticle`
Returns the particle type (`SchemaParticle.ALL`, `SchemaParticle.CHOICE`, `SchemaParticle.SEQUENCE`, `SchemaParticle.ELEMENT`, or `SchemaParticle.WILDCARD`).

Specified by:
  `getParticleType` in interface `SchemaParticle`

#### setParticleType

    public void setParticleType(int pType)

#### isSingleton

    public boolean isSingleton()

Description copied from interface: `SchemaParticle`
One if minOccurs == maxOccurs == 1.

Specified by:
  `isSingleton` in interface `SchemaParticle`

#### getMinOccurs

    public BigInteger getMinOccurs()

Description copied from interface: `SchemaParticle`
Returns the minOccurs value for this particle. If it's not specified explicitly, this returns BigInteger.ONE.

Specified by:
  `getMinOccurs` in interface `SchemaParticle`

#### setMinOccurs

    public void setMinOccurs(BigInteger min)

#### getIntMinOccurs

    public int getIntMinOccurs()

Description copied from interface: `SchemaParticle`
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.

Specified by:
  `getIntMinOccurs` in interface `SchemaParticle`

#### getMaxOccurs

    public BigInteger getMaxOccurs()

Description copied from interface: `SchemaParticle`
Returns the maxOccurs value for this particle, or null if it is unbounded. If it's not specified explicitly, this returns BigInteger.ONE.

Specified by:
  `getMaxOccurs` in interface `SchemaParticle`

#### getIntMaxOccurs

    public int getIntMaxOccurs()

Description copied from interface: `SchemaParticle`
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.

Specified by:
  `getIntMaxOccurs` in interface `SchemaParticle`

#### setMaxOccurs

    public void setMaxOccurs(BigInteger max)

#### getParticleChildren

    public SchemaParticle[] getParticleChildren()

Description copied from interface: `SchemaParticle`
Applies to sequence, choice, and all particles only: returns an array of all the particle children in order.

Specified by:
  `getParticleChildren` in interface `SchemaParticle`

#### setParticleChildren

    public void setParticleChildren(SchemaParticle[] children)

#### getParticleChild

    public SchemaParticle getParticleChild(int i)

Description copied from interface: `SchemaParticle`
Another way to access the particle children.

Specified by:
  `getParticleChild` in interface `SchemaParticle`

#### countOfParticleChild

    public int countOfParticleChild()

Description copied from interface: `SchemaParticle`
The number of children.

Specified by:
  `countOfParticleChild` in interface `SchemaParticle`

#### setWildcardSet

    public void setWildcardSet(QNameSet set)

#### getWildcardSet

    public QNameSet getWildcardSet()

Description copied from interface: `SchemaParticle`
For wildcards, returns a QNameSet representing the wildcard.

Specified by:
  `getWildcardSet` in interface `SchemaParticle`

#### setWildcardProcess

    public void setWildcardProcess(int process)

#### getWildcardProcess

    public int getWildcardProcess()

Description copied from interface: `SchemaParticle`
For wildcards, returns the processing code (`SchemaParticle.STRICT`, `SchemaParticle.LAX`, `SchemaParticle.SKIP`).

Specified by:
  `getWildcardProcess` in interface `SchemaParticle`

#### getName

    public QName getName()

Description copied from interface: `SchemaParticle`
For elements only: the QName for the element use. May be unqualified version of referenced element's name.

Specified by:
  `getName` in interface `SchemaParticle`

#### setNameAndTypeRef

    public void setNameAndTypeRef(QName formname,
                                  SchemaType.Ref typeref)

#### isTypeResolved

    public boolean isTypeResolved()

#### resolveTypeRef

    public void resolveTypeRef(SchemaType.Ref typeref)

#### isAttribute

    public boolean isAttribute()

#### getType

    public SchemaType getType()

Description copied from interface: `SchemaParticle`
For elements only: returns the type of the element.

Specified by:
  `getType` in interface `SchemaParticle`

#### getDefaultText

    public String getDefaultText()

Description copied from interface: `SchemaParticle`
For elements only: returns the default (or fixed) text value

Specified by:
  `getDefaultText` in interface `SchemaParticle`

#### isDefault

    public boolean isDefault()

Description copied from interface: `SchemaParticle`
For elements only: True if has default. If isFixed, then isDefault is always true.

Specified by:
  `isDefault` in interface `SchemaParticle`

#### isFixed

    public boolean isFixed()

Description copied from interface: `SchemaParticle`
For elements only: true if is fixed value.

Specified by:
  `isFixed` in interface `SchemaParticle`

#### setDefault

    public void setDefault(String deftext,
                           boolean isFixed,
                           XmlObject parseObject)

#### isNillable

    public boolean isNillable()

Description copied from interface: `SchemaParticle`
For elements only: true if nillable.

Specified by:
  `isNillable` in interface `SchemaParticle`

#### setNillable

    public void setNillable(boolean nillable)

#### getDefaultValue

    public XmlAnySimpleType getDefaultValue()

Description copied from interface: `SchemaParticle`
For elements only: returns the default (or fixed) strongly-typed value

Specified by:
  `getDefaultValue` in interface `SchemaParticle`

#### setDefaultValue

    public void setDefaultValue(XmlValueRef defaultRef)

#### getUserData

    public Object getUserData()

#### setUserData

    public void setUserData(Object data)

#### getDocumentation

    public String getDocumentation()

Description copied from interface: `SchemaParticle`
Returns user specified documentation

     <xs:element ... >
       <xs:annotation>
         <xs:documentation>
          getDocumentation method will return whatever stuff here.
         </xs:documentation>
       </xs:annotation>
     </xs:element>

Specified by:
  `getDocumentation` in interface `SchemaParticle`