|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.saxonica.schema.SchemaStructure
com.saxonica.schema.AbstractParticle
public abstract class AbstractParticle
An abstract class that implements an XML Schema Particle.
Note that not all Particles belong to this class. In particular, Element Wildcards are particles,
but they are not instances of AbstractParticle: this is because it is more convenient for them to
share implementation details with Attribute Wildcards. To refer generically to Particles, use
the Particle
interface.
Field Summary | |
---|---|
static int |
UNBOUNDED
A constant to represent an UNBOUNDED number of occurrences |
Fields inherited from interface net.sf.saxon.type.SchemaComponent |
---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
Fields inherited from interface com.saxonica.schema.SerializableSchemaComponent |
---|
ALL_COMPOSITOR, ATOMIC_TYPE, ATTRIBUTE_DECL, ATTRIBUTE_GROUP, ATTRIBUTE_GROUP_REF, ATTRIBUTE_USE, ATTRIBUTE_WILDCARD, CHOICE_COMPOSITOR, COMPLEX_TYPE, ELEMENT_DECL, ELEMENT_PARTICLE, ELEMENT_WILDCARD, FACET, KEY, KEYREF, LIST_TYPE, MODEL_GROUP, MODEL_GROUP_REF, NOTATION, SEQUENCE_COMPOSITOR, UNION_TYPE, UNIQUE |
Method Summary | |
---|---|
static int |
computeParticleCardinality(int minOccurs,
int maxOccurs)
Compute an XPath cardinality (e.g. |
int |
getMaxOccurs()
Returns the maximum number of occurrences that this Particle may appear in the containing content model |
int |
getMinOccurs()
Returns the minimum number of occurrences that this Particle must appear in the containing content model |
abstract Term |
getTerm()
Get the term corresponding to this particle |
boolean |
isPointless(Particle container)
Test whether the particle is pointless, as described in XML Schema Part 1 Schema Component Constraint: Particle Valid (Restriction) |
void |
setMaxOccurs(int maxOccurs)
Sets the maximum number of occurrences for this Particle within the containing content model |
void |
setMinOccurs(int minOccurs)
Sets the minimum number of occurrences for this Particle within the containing content model |
Methods inherited from class com.saxonica.schema.SchemaStructure |
---|
getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setSystemId, setValidationStatus |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.saxonica.schema.Particle |
---|
compile, gatherAllPermittedElements, getElementParticleCardinality, getElementParticleType, isEmptiable |
Methods inherited from interface com.saxonica.schema.UserSchemaComponent |
---|
fixup, lookForCycles, validate |
Methods inherited from interface net.sf.saxon.type.SchemaComponent |
---|
getValidationStatus |
Methods inherited from interface com.saxonica.schema.SerializableSchemaComponent |
---|
getComponentTypeCode, serialize |
Field Detail |
---|
public static int UNBOUNDED
Method Detail |
---|
public final int getMaxOccurs()
getMaxOccurs
in interface Particle
public final int getMinOccurs()
getMinOccurs
in interface Particle
public final void setMaxOccurs(int maxOccurs)
maxOccurs
- the maximum number of occurrences for this Particle, or -1 to indicate
that the maximum is unboundedpublic final void setMinOccurs(int minOccurs)
setMinOccurs
in interface Particle
minOccurs
- the minimum number of occurrences for this Particlepublic abstract Term getTerm()
getTerm
in interface Particle
public boolean isPointless(Particle container)
isPointless
in interface Particle
public static int computeParticleCardinality(int minOccurs, int maxOccurs)
minOccurs
- Minimum occurrencesmaxOccurs
- Maximum occurrences (-1 = unbounded)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |