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
-
-
Constructor Summary
Constructors Constructor Description SchemaParticleImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods 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()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)
-
-
-
Method Detail
-
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: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
public QNameSet 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
public QNameSet 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
public BigInteger 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
public void setMinOccurs(BigInteger min)
-
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
public BigInteger 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
public void setMaxOccurs(BigInteger max)
-
getParticleChildren
public SchemaParticle[] 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
public void setParticleChildren(SchemaParticle[] children)
-
getParticleChild
public SchemaParticle getParticleChild(int i)
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
public void setWildcardSet(QNameSet set)
-
getWildcardSet
public QNameSet 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
public QName 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
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:SchemaParticleFor elements only: returns the type of the element.- Specified by:
getTypein interfaceSchemaParticle
-
getDefaultText
public String 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
-
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
public XmlAnySimpleType getDefaultValue()
Description copied from interface:SchemaParticleFor elements only: returns the default (or fixed) strongly-typed value- Specified by:
getDefaultValuein interfaceSchemaParticle
-
setDefaultValue
public void setDefaultValue(XmlValueRef defaultRef)
-
getUserData
public Object getUserData()
-
setUserData
public void setUserData(Object data)
-
-