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
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns 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
The number of children.For elements only: returns the default (or fixed) text valueFor elements only: returns the default (or fixed) strongly-typed valueReturns user specified documentationint
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
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.Returns the maxOccurs value for this particle, or null if it is unbounded.Returns the minOccurs value for this particle.getName()
For elements only: the QName for the element use.getParticleChild
(int i) Another way to access the particle children.Applies to sequence, choice, and all particles only: returns an array of all the particle children in order.int
Returns the particle type (SchemaParticle.ALL
,SchemaParticle.CHOICE
,SchemaParticle.SEQUENCE
,SchemaParticle.ELEMENT
, orSchemaParticle.WILDCARD
).getType()
For elements only: returns the type of the element.int
For wildcards, returns the processing code (SchemaParticle.STRICT
,SchemaParticle.LAX
,SchemaParticle.SKIP
).For wildcards, returns a QNameSet representing the wildcard.boolean
boolean
boolean
boolean
For elements only: True if has default.boolean
boolean
isFixed()
For elements only: true if is fixed value.boolean
For elements only: true if nillable.boolean
One if minOccurs == maxOccurs == 1.boolean
True if this particle can be skipped (taking into account both the minOcurs as well as the structure of all the child particles)boolean
void
resolveTypeRef
(SchemaType.Ref typeref) void
setDefault
(String deftext, boolean isFixed, XmlObject parseObject) void
setDefaultValue
(XmlValueRef defaultRef) void
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)
-
Constructor Details
-
SchemaParticleImpl
public SchemaParticleImpl()
-
-
Method Details
-
setImmutable
public void setImmutable() -
hasTransitionRules
public boolean hasTransitionRules() -
hasTransitionNotes
public boolean hasTransitionNotes() -
setTransitionRules
-
setTransitionNotes
-
canStartWithElement
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 interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
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
, orSchemaParticle.WILDCARD
).- Specified by:
getParticleType
in interfaceSchemaParticle
-
setParticleType
public void setParticleType(int pType) -
isSingleton
public boolean isSingleton()Description copied from interface:SchemaParticle
One if minOccurs == maxOccurs == 1.- Specified by:
isSingleton
in interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
setMinOccurs
-
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 interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
setMaxOccurs
-
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 interfaceSchemaParticle
-
setParticleChildren
-
getParticleChild
Description copied from interface:SchemaParticle
Another way to access the particle children.- Specified by:
getParticleChild
in interfaceSchemaParticle
-
countOfParticleChild
public int countOfParticleChild()Description copied from interface:SchemaParticle
The number of children.- Specified by:
countOfParticleChild
in interfaceSchemaParticle
-
setWildcardSet
-
getWildcardSet
Description copied from interface:SchemaParticle
For wildcards, returns a QNameSet representing the wildcard.- Specified by:
getWildcardSet
in interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
setNameAndTypeRef
-
isTypeResolved
public boolean isTypeResolved() -
resolveTypeRef
-
isAttribute
public boolean isAttribute() -
getType
Description copied from interface:SchemaParticle
For elements only: returns the type of the element.- Specified by:
getType
in interfaceSchemaParticle
-
getDefaultText
Description copied from interface:SchemaParticle
For elements only: returns the default (or fixed) text value- Specified by:
getDefaultText
in interfaceSchemaParticle
-
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 interfaceSchemaParticle
-
isFixed
public boolean isFixed()Description copied from interface:SchemaParticle
For elements only: true if is fixed value.- Specified by:
isFixed
in interfaceSchemaParticle
-
setDefault
-
isNillable
public boolean isNillable()Description copied from interface:SchemaParticle
For elements only: true if nillable.- Specified by:
isNillable
in interfaceSchemaParticle
-
setNillable
public void setNillable(boolean nillable) -
getDefaultValue
Description copied from interface:SchemaParticle
For elements only: returns the default (or fixed) strongly-typed value- Specified by:
getDefaultValue
in interfaceSchemaParticle
-
setDefaultValue
-
getUserData
-
setUserData
-
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 interfaceSchemaParticle
-