Package 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 Modifier and Type Field Description protected XmlObject_parseObject -
Constructor Summary
Constructors Constructor Description SchemaParticleImpl() -
Method Summary
Modifier and Type Method Description QNameSetacceptedStartNames()Returns 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).intcountOfParticleChild()The number of children.StringgetDefaultText()For elements only: returns the default (or fixed) text valueXmlAnySimpleTypegetDefaultValue()For elements only: returns the default (or fixed) strongly-typed valueQNameSetgetExcludeNextSet()intgetIntMaxOccurs()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.intgetIntMinOccurs()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.BigIntegergetMaxOccurs()Returns the maxOccurs value for this particle, or null if it is unbounded.BigIntegergetMinOccurs()Returns the minOccurs value for this particle.QNamegetName()For elements only: the QName for the element use.SchemaParticlegetParticleChild(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.intgetParticleType()Returns the particle type (SchemaParticle.ALL,SchemaParticle.CHOICE,SchemaParticle.SEQUENCE,SchemaParticle.ELEMENT, orSchemaParticle.WILDCARD).SchemaTypegetType()For elements only: returns the type of the element.ObjectgetUserData()intgetWildcardProcess()For wildcards, returns the processing code (SchemaParticle.STRICT,SchemaParticle.LAX,SchemaParticle.SKIP).QNameSetgetWildcardSet()For wildcards, returns a QNameSet representing the wildcard.booleanhasTransitionNotes()booleanhasTransitionRules()booleanisAttribute()booleanisDefault()For elements only: True if has default.booleanisDeterministic()booleanisFixed()For elements only: true if is fixed value.booleanisNillable()For elements only: true if nillable.booleanisSingleton()One if minOccurs == maxOccurs == 1.booleanisSkippable()True if this particle can be skipped (taking into account both the minOcurs as well as the structure of all the child particles)booleanisTypeResolved()protected voidmutate()voidresolveTypeRef(SchemaType.Ref typeref)voidsetDefault(String deftext, boolean isFixed, XmlObject parseObject)voidsetDefaultValue(XmlValueRef defaultRef)voidsetImmutable()voidsetMaxOccurs(BigInteger max)voidsetMinOccurs(BigInteger min)voidsetNameAndTypeRef(QName formname, SchemaType.Ref typeref)voidsetNillable(boolean nillable)voidsetParticleChildren(SchemaParticle[] children)voidsetParticleType(int pType)voidsetTransitionNotes(QNameSet excludeNext, boolean isDeterministic)voidsetTransitionRules(QNameSet start, boolean isSkippable)voidsetUserData(Object data)voidsetWildcardProcess(int process)voidsetWildcardSet(QNameSet set)
-
Field Details
-
Constructor Details
-
SchemaParticleImpl
public SchemaParticleImpl()
-
-
Method Details
-
mutate
protected void mutate() -
setImmutable
public void setImmutable() -
hasTransitionRules
public boolean hasTransitionRules() -
hasTransitionNotes
public boolean hasTransitionNotes() -
setTransitionRules
-
setTransitionNotes
-
canStartWithElement
Description copied from interface:SchemaParticleTrue if this particle can start with the given element (taking into account the structure of all child particles of course).- Specified by:
canStartWithElementin interfaceSchemaParticle
-
acceptedStartNames
Description copied from interface:SchemaParticleReturns the QNameSet of element names that can be accepted at the beginning of this particle.- Specified by:
acceptedStartNamesin interfaceSchemaParticle
-
getExcludeNextSet
-
isSkippable
public boolean isSkippable()Description copied from interface:SchemaParticleTrue if this particle can be skipped (taking into account both the minOcurs as well as the structure of all the child particles)- Specified by:
isSkippablein interfaceSchemaParticle
-
isDeterministic
public boolean isDeterministic() -
getParticleType
public int getParticleType()Description copied from interface:SchemaParticleReturns the particle type (SchemaParticle.ALL,SchemaParticle.CHOICE,SchemaParticle.SEQUENCE,SchemaParticle.ELEMENT, orSchemaParticle.WILDCARD).- Specified by:
getParticleTypein interfaceSchemaParticle
-
setParticleType
public void setParticleType(int pType) -
isSingleton
public boolean isSingleton()Description copied from interface:SchemaParticleOne if minOccurs == maxOccurs == 1.- Specified by:
isSingletonin interfaceSchemaParticle
-
getMinOccurs
Description copied from interface:SchemaParticleReturns the minOccurs value for this particle. If it's not specified explicitly, this returns BigInteger.ONE.- Specified by:
getMinOccursin interfaceSchemaParticle
-
setMinOccurs
-
getIntMinOccurs
public int getIntMinOccurs()Description copied from interface:SchemaParticleReturns 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:
getIntMinOccursin interfaceSchemaParticle
-
getMaxOccurs
Description copied from interface:SchemaParticleReturns the maxOccurs value for this particle, or null if it is unbounded. If it's not specified explicitly, this returns BigInteger.ONE.- Specified by:
getMaxOccursin interfaceSchemaParticle
-
getIntMaxOccurs
public int getIntMaxOccurs()Description copied from interface:SchemaParticleReturns 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:
getIntMaxOccursin interfaceSchemaParticle
-
setMaxOccurs
-
getParticleChildren
Description copied from interface:SchemaParticleApplies to sequence, choice, and all particles only: returns an array of all the particle children in order.- Specified by:
getParticleChildrenin interfaceSchemaParticle
-
setParticleChildren
-
getParticleChild
Description copied from interface:SchemaParticleAnother way to access the particle children.- Specified by:
getParticleChildin interfaceSchemaParticle
-
countOfParticleChild
public int countOfParticleChild()Description copied from interface:SchemaParticleThe number of children.- Specified by:
countOfParticleChildin interfaceSchemaParticle
-
setWildcardSet
-
getWildcardSet
Description copied from interface:SchemaParticleFor wildcards, returns a QNameSet representing the wildcard.- Specified by:
getWildcardSetin interfaceSchemaParticle
-
setWildcardProcess
public void setWildcardProcess(int process) -
getWildcardProcess
public int getWildcardProcess()Description copied from interface:SchemaParticleFor wildcards, returns the processing code (SchemaParticle.STRICT,SchemaParticle.LAX,SchemaParticle.SKIP).- Specified by:
getWildcardProcessin interfaceSchemaParticle
-
getName
Description copied from interface:SchemaParticleFor elements only: the QName for the element use. May be unqualified version of referenced element's name.- Specified by:
getNamein interfaceSchemaParticle
-
setNameAndTypeRef
-
isTypeResolved
public boolean isTypeResolved() -
resolveTypeRef
-
isAttribute
public boolean isAttribute() -
getType
Description copied from interface:SchemaParticleFor elements only: returns the type of the element.- Specified by:
getTypein interfaceSchemaParticle
-
getDefaultText
Description copied from interface:SchemaParticleFor elements only: returns the default (or fixed) text value- Specified by:
getDefaultTextin interfaceSchemaParticle
-
isDefault
public boolean isDefault()Description copied from interface:SchemaParticleFor elements only: True if has default. If isFixed, then isDefault is always true.- Specified by:
isDefaultin interfaceSchemaParticle
-
isFixed
public boolean isFixed()Description copied from interface:SchemaParticleFor elements only: true if is fixed value.- Specified by:
isFixedin interfaceSchemaParticle
-
setDefault
-
isNillable
public boolean isNillable()Description copied from interface:SchemaParticleFor elements only: true if nillable.- Specified by:
isNillablein interfaceSchemaParticle
-
setNillable
public void setNillable(boolean nillable) -
getDefaultValue
Description copied from interface:SchemaParticleFor elements only: returns the default (or fixed) strongly-typed value- Specified by:
getDefaultValuein interfaceSchemaParticle
-
setDefaultValue
-
getUserData
-
setUserData
-