public class ModelGroupParticle extends Particle
There is no direct equivalent of a ModelGroupParticle in the W3C schema component model,
because in that model the structure of a complex type is always fully expanded: that is,
any group references are replaced by the content of the group they refer to. This model
retains group references to allow late binding and redefinition. However, methods are
provided on the ModelGroup class to give a view of the content model in which the
group references disappear.
SchemaComponent.ValidationStatussymbolSpace, targetCOMPONENT_FUNCTION_TYPE| Constructor and Description |
|---|
ModelGroupParticle(EnterpriseConfiguration config,
javax.xml.transform.SourceLocator locator)
Creates a new Group reference
|
| Modifier and Type | Method and Description |
|---|---|
void |
compile(SchemaCompiler compiler)
Compile a particle
|
boolean |
containsElementWildcard()
Ask whether the particle contains an element wildcard
|
void |
elaborate(SchemaCompiler compiler)
Elaborate the schema component: after reloading a serialized schema component model,
this expands the component with derived information needed during validation episodes.
|
boolean |
fixup(SchemaCompiler compiler)
Fix up references to other elements in the schema.
|
void |
gatherAllPermittedElements(IntHashSet result,
boolean ignoreWildcards)
Find the set of all element particles allowed within the content model of this particle, identified
by their integer fingerprints.
|
int |
getElementParticleCardinality(int elementName)
Find an element particle within this complex type definition having a given element name
(identified by fingerprint), and return the cardinality associated with that element particle,
that is, the number of times the element can occur within this complex type.
|
SchemaType |
getElementParticleType(int elementName)
Find an element particle within this complex type definition having a given element name
(identified by elementName), and return the schema type associated with that element particle.
|
ModelGroup |
getGroup() |
int |
getSymbolSpace()
Get the symbol space of the target of this reference
|
SchemaComponent |
getTarget()
Returns the group that this group object is a reference to.
|
Term |
getTerm()
Get the term corresponding to this particle
|
boolean |
isEmptiable()
Determine if empty content is allowed
|
boolean |
isPointless(ModelGroup container)
Test whether the particle is pointless, as described in XML Schema Part 1
Schema Component Constraint: Particle Valid (Restriction)
|
boolean |
isResolved()
Determine whether this reference has been resolved
|
void |
lookForCycles(java.util.Stack references,
SchemaCompiler compiler)
This method is called to look for cycles.
|
void |
markVulnerableSubParticles()
Mark the vulnerable subParticles of this particle
|
void |
serializeParticle(SchemaModelSerializer serializer)
Serialize the schema component as a particle
|
void |
tryToResolve(SchemaCompiler compiler)
Attempt to resolved this reference using the groups defined in a given schema.
|
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this Schema definition.
|
computeParticleCardinality, getComponentAsFunction, getMaxOccurs, getMinOccurs, isVulnerable, setMaxOccurs, setMinOccurs, setVulnerablegetTargetComponentName, getTargetFingerprint, isDangling, setTarget, setTargetComponentNamegetColumnNumber, getConfiguration, getFixupStatus, getGeneratedId, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, hasSameLocation, isValidationNeeded, makeXPathExpressionPropertyRecord, saveLocation, setConfiguration, setFixupStatus, setGeneratedId, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatusclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetRedefinitionLevel, getValidationStatusgetConfigurationgetColumnNumber, getLineNumber, getPublicId, getSystemId, saveLocationpublic ModelGroupParticle(EnterpriseConfiguration config, javax.xml.transform.SourceLocator locator)
config - the Configuration to which this Group belongslocator - the location of the corresponding declaration in the source schema documentpublic boolean isResolved()
isResolved in interface ComponentReferenceisResolved in class SimpleComponentReferencepublic ModelGroup getGroup() throws MissingComponentException
MissingComponentExceptionpublic int getSymbolSpace()
getSymbolSpace in interface ComponentReferencegetSymbolSpace in class SimpleComponentReferencepublic boolean isEmptiable()
throws MissingComponentException
isEmptiable in class ParticleMissingComponentException - if the schema contains an unresolved reference to a required componentpublic boolean fixup(SchemaCompiler compiler) throws SchemaException
fixup in interface UserSchemaComponentfixup in class Particlecompiler - the schema compilerSchemaException - if a fatal error occurspublic void lookForCycles(java.util.Stack references,
SchemaCompiler compiler)
throws SchemaException,
MissingComponentException
lookForCycles in interface UserSchemaComponentlookForCycles in class SchemaStructurereferences - A list of objects that contain direct or indirect references
to this object, and that must therefore not be referred to from this object.compiler - The schema compilerSchemaExceptionMissingComponentExceptionpublic SchemaComponent getTarget() throws MissingComponentException
getTarget in interface ComponentReferencegetTarget in class SimpleComponentReferenceMissingComponentException - if the reference has not been resolved. Note that
this is an unchecked exception.public void tryToResolve(SchemaCompiler compiler)
tryToResolve in interface ComponentReferencetryToResolve in class SimpleComponentReferencecompiler - The compiler being used to compile the referring component.
This is assumed to know about the schema containing the candidate target components for the reference. If
null, the schema containing the reference is used.public boolean isPointless(ModelGroup container) throws MissingComponentException
isPointless in class Particlecontainer - the model group containing this particle; null if there is no containing model groupMissingComponentExceptionpublic SchemaType getElementParticleType(int elementName) throws MissingComponentException
getElementParticleType in class ParticleelementName - Identifies the name of the child element within this content modelMissingComponentExceptionpublic int getElementParticleCardinality(int elementName)
throws MissingComponentException
StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ZERO_OR_ONE,
StaticProperty.ALLOWS_ZERO_OR_MORE, StaticProperty.ALLOWS_ONE_OR_MORE,
If there is no such particle, return StaticProperty.ALLOWS_ZERO.getElementParticleCardinality in class ParticleelementName - Identifies the name of the child element within this content modelMissingComponentExceptionpublic boolean containsElementWildcard()
throws MissingComponentException
containsElementWildcard in class ParticleMissingComponentExceptionpublic void gatherAllPermittedElements(IntHashSet result, boolean ignoreWildcards) throws SchemaException
gatherAllPermittedElements in class Particleresult - an initially-empty integer set in which the results are accumulatedignoreWildcards - true if wildcard particles are to be ignored. If false, the resulting setSchemaException - if an error is found in the schemapublic void markVulnerableSubParticles()
throws MissingComponentException
markVulnerableSubParticles in class ParticleMissingComponentExceptionpublic boolean validate(SchemaCompiler compiler) throws SchemaException
validate in interface UserSchemaComponentvalidate in class Particlecompiler - the schema compilerSchemaExceptionpublic void compile(SchemaCompiler compiler) throws SchemaException
compile in class Particlecompiler - the schema compmilerSchemaException - if a fatal error occurspublic Term getTerm() throws MissingComponentException
getTerm in class ParticleMissingComponentExceptionpublic void elaborate(SchemaCompiler compiler) throws SchemaException
elaborate in interface UserSchemaComponentelaborate in class SchemaStructurecompiler - the schema compilerSchemaException - if the schema is found to be invalidpublic void serializeParticle(SchemaModelSerializer serializer) throws XPathException
serializeParticle in class Particleserializer - the object responsible for serializationXPathException - if writing the serialized form to the destination failsMissingComponentException - if the schema cannot be serialized because some components are missing.Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.