|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.saxonica.schema.SchemaElement
|
+--com.saxonica.schema.AbstractParticle
|
+--com.saxonica.schema.Compositor
An XML Schema Compositor: choice, sequence, or all. Also used for a group
| Field Summary | |
protected java.util.List |
contentModel
|
| Fields inherited from class com.saxonica.schema.AbstractParticle |
UNBOUNDED |
| Fields inherited from class com.saxonica.schema.SchemaElement |
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, COMPOSITOR, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD_ATTRIBUTE, WILDCARD_ELEMENT |
| Constructor Summary | |
Compositor()
Creates a new Compositor, with no name |
|
| Method Summary | |
void |
addParticle(Particle particle)
Adds a given Particle to the content model defined by this Compositor |
protected boolean |
checkElements(java.util.HashMap map,
Schema schema)
Check that the elements defined as particles in this compositor are consistent |
void |
compile(Schema schema,
UserComplexType subjectType)
Compile this Compositor by compiling each of the particles contained in its content model. |
boolean |
containsAll()
Test whether this compositor contains an xs:all compositor |
boolean |
fixup(Schema schema)
Check references from this component to other components |
java.lang.String |
getId()
Returns the ID for this Compositor (that is, the value of the 'id' attribute if present) |
ElementDecl |
getLocalElementDeclaration(int fingerprint)
Get the contained element declaration with a given name. |
short |
getStructureType()
Returns the type of this Schema Structure |
boolean |
isEmpty()
Return true if the content model is empty |
boolean |
isVoidValidationContext()
Determine whether this is a void validation context (a context in which nothing will validate) |
java.util.Iterator |
iterateParticles()
Returns an iterator over all the Particles of the content model defined by this Compositor. |
void |
lookForCycles(Schema schema,
java.util.Stack references)
This method is called to look for cycles. |
void |
setId(java.lang.String id)
Sets the ID for this Compositor. |
boolean |
validate(Schema schema)
Checks the validity of this Compositor definition. |
| Methods inherited from class com.saxonica.schema.AbstractParticle |
getMaxOccurs, getMinOccurs, getTerm, setMaxOccurs, setMinOccurs |
| Methods inherited from class com.saxonica.schema.SchemaElement |
getColumnNumber, getLineNumber, getPublicId, getSystemId, setLocator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.saxonica.schema.Particle |
isEmptiable |
| Field Detail |
protected java.util.List contentModel
| Constructor Detail |
public Compositor()
| Method Detail |
public boolean isVoidValidationContext()
isVoidValidationContext in interface ValidationContextpublic java.lang.String getId()
public void setId(java.lang.String id)
id - the ID for this Compositor.
public void addParticle(Particle particle)
throws SchemaException
particle - the Particle to be added
SchemaException - if this particle cannot be added,
for example when a group with the same name as the
specified group already exists in the current scopepublic java.util.Iterator iterateParticles()
public boolean isEmpty()
public short getStructureType()
getStructureType in class SchemaElementpublic ElementDecl getLocalElementDeclaration(int fingerprint)
fingerprint - the fingerprint of the required element name
public boolean containsAll()
public void lookForCycles(Schema schema,
java.util.Stack references)
throws SchemaException
lookForCycles in interface CircularityCheckerreferences - A list of objects that contain direct or indirect references
to this object, and that must therefore not be referred to from this object.
SchemaException
public boolean validate(Schema schema)
throws javax.xml.transform.TransformerException
validate in interface SchemaComponentschema - if this is not null, any errors that are detected should
be reported using the error() method of this schema.
javax.xml.transform.TransformerException - when the error listener decides an error is fatal
protected boolean checkElements(java.util.HashMap map,
Schema schema)
throws SchemaException
SchemaException
public void compile(Schema schema,
UserComplexType subjectType)
throws SchemaException
compile in interface Particleschema - The containing schema (used to generate error messages)subjectType - The containing complex type (used so that this can be registered with any
elements appearing as particles in the content model, so that the complex type can be recompiled
if the substitution group membership of the element declaration subsequently changes)
SchemaException - if compilation fails.
public boolean fixup(Schema schema)
throws SchemaException
SchemaComponent
fixup in interface SchemaComponentschema - The schema is used for reporting errors
SchemaException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||