|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.schema.SchemaStructure com.saxonica.schema.ModelGroup com.saxonica.schema.AllModelGroup
public class AllModelGroup
An AllModelGroup represents an xs:all element in the schema
Field Summary |
---|
Fields inherited from class com.saxonica.schema.ModelGroup |
---|
contentModel, simplifiedContentModel |
Fields inherited from interface net.sf.saxon.type.SchemaComponent |
---|
FIXED_UP, INCOMPLETE, INVALID, UNVALIDATED, VALIDATED, VALIDATING |
Constructor Summary | |
---|---|
AllModelGroup()
Create an AllModelGroup |
Method Summary | |
---|---|
void |
addParticle(Particle particle)
Adds a given Particle to the content model defined by this Compositor |
protected static String |
allSubsumes(UserComplexType base,
ComplexType sub,
SchemaCompiler compiler)
Test whether a complex type constructed using "all" subsumes another complex type. |
protected boolean |
checkElements(IntHashMap<ElementDecl> map,
SchemaCompiler compiler)
Check that the elements defined as particles in this compositor are consistent (overrides method on parent class ModelGroup) |
boolean |
containsAll(boolean simplified)
Determine if the content model uses xs:all. |
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. |
String |
getCompositorName()
Get the name of this compositor |
IntToIntMap |
getCounterMap()
Get a mapping from element name fingerprints (including fingerprints of substitution group members) to entries in the minima and maxima arrays. |
IntHashMap |
getDeclarationMap()
Get a mapping from element name fingerprints (including fingerprints of substitution group members) to local or global element declarations to be used to validate the content of each element in the all group |
int[] |
getMaxima()
Get the values of maxOccurs() for all the particles, as an array |
int[] |
getMinima()
Get the values of minOccurs() for all the particles, as an array |
int[] |
getNameCodes()
Get the namecodes of the element particles corresponding to each item in the maxima/minima arrays. |
int |
getNumberOfElementParticles()
Get the number of element particles |
List<Particle> |
getSimplifiedContentModel()
Remove pointless particles from this content model (recursively), and replace group references by the content of the identified group |
List<ElementWildcard> |
getWildcards()
Get the list of element wildcards (XSDL 1.1 only) |
boolean |
isEmptiable()
Determine if empty content is allowed |
boolean |
isPointless(ModelGroup container)
Test whether the compositor is pointless, as described in XML Schema Part 1 Schema Component Constraint: Particle Valid (Restriction) |
boolean |
validate(SchemaCompiler compiler)
Checks the validity of this Compositor definition. |
Methods inherited from class com.saxonica.schema.ModelGroup |
---|
compile, containsElementWildcard, fixup, gatherAllPermittedElements, getContentModelSize, getElementParticleCardinality, getElementParticleType, getListOfParticles, getTerm, isEmpty, iterateParticles, lookForCycles, markVulnerableSubParticles, serialize, setContentModel |
Methods inherited from class com.saxonica.schema.SchemaStructure |
---|
getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSystemId, getValidationStatus, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSystemId, setValidationStatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.type.SchemaComponent |
---|
getRedefinitionLevel, getValidationStatus |
Constructor Detail |
---|
public AllModelGroup()
Method Detail |
---|
public void addParticle(Particle particle)
addParticle
in class ModelGroup
particle
- the Particle to be addedpublic int getNumberOfElementParticles()
public boolean containsAll(boolean simplified)
containsAll
in class ModelGroup
simplified
- set to false if we want to look at the original unsimplified
content model, to true if we want the model after removing pointless particles
public boolean isEmptiable() throws UnresolvedReferenceException
isEmptiable
in class ModelGroup
UnresolvedReferenceException
public boolean isPointless(ModelGroup container)
isPointless
in class ModelGroup
container
- not used
protected boolean checkElements(IntHashMap<ElementDecl> map, SchemaCompiler compiler) throws SchemaException, UnresolvedReferenceException
checkElements
in class ModelGroup
map
- a HashMap that maps integers to ElementDecl'scompiler
- used for error reporting
SchemaException
UnresolvedReferenceException
public String getCompositorName()
getCompositorName
in class ModelGroup
public List<Particle> getSimplifiedContentModel()
getSimplifiedContentModel
in class ModelGroup
public boolean validate(SchemaCompiler compiler) throws SchemaException
validate
in interface UserSchemaComponent
validate
in class ModelGroup
SchemaException
- when the error listener decides an error is fatalpublic void elaborate(SchemaCompiler compiler) throws SchemaException
elaborate
in interface UserSchemaComponent
elaborate
in class SchemaStructure
compiler
-
SchemaException
public int[] getMaxima()
public int[] getMinima()
public int[] getNameCodes()
public IntToIntMap getCounterMap()
public IntHashMap getDeclarationMap()
public List<ElementWildcard> getWildcards()
protected static String allSubsumes(UserComplexType base, ComplexType sub, SchemaCompiler compiler) throws SchemaException
base
- the base type, which must be defined using xs:allsub
- the type that is (supposedly) subsumed by the base typecompiler
- used for reporting errors and warnings
SchemaException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |