Free Trial - Stylus Studio, The World's Best XML IDE!


com.saxonica.schema
Class Group

java.lang.Object
  |
  +--com.saxonica.schema.SchemaElement
        |
        +--com.saxonica.schema.AbstractParticle
              |
              +--com.saxonica.schema.Compositor
                    |
                    +--com.saxonica.schema.Group
All Implemented Interfaces:
CircularityChecker, Particle, SchemaComponent, SchemaDeclaration, java.io.Serializable, javax.xml.transform.SourceLocator, Term, ValidationContext

public class Group
extends Compositor
implements SchemaComponent, CircularityChecker

An XML Schema Group

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.saxonica.schema.Compositor
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
Group(Schema schema, javax.xml.transform.SourceLocator locator)
          Creates a new Group definition
 
Method Summary
 boolean fixup(Schema schema)
          Fixup the reference to the referenced group
 Compositor getContentModelGroup()
          Returns the ContentModelGroup for this group Only used for a element
 int getFingerprint()
           
 java.lang.String getName()
          Returns the name of this Group.
 Group getReference()
          Returns the group that this group object is a reference to
 short getStructureType()
          Returns the type of this Schema Structure
 boolean isEmptiable()
          Determine if empty content is allowed
 boolean isReference()
          Returns true if this model group definition simply references another model group Definition
 java.util.Iterator iterateParticles()
          Returns an enumeration of all the Particles of this ContentModelGroup
 void lookForCycles(Schema schema, java.util.Stack references)
          This method is called to look for cycles.
 void setFingerprint(int fingerprint)
           
 void setName(java.lang.String name)
          Set the name of the group
 void setReference(boolean isRef)
          Sets the reference for this Group definition
 void setSchema(Schema schema)
          Sets the Schema that contains this group.
 boolean validate(javax.xml.transform.ErrorListener errorListener)
          Checks the validity of this Schema defintion.
 
Methods inherited from class com.saxonica.schema.Compositor
addParticle, checkElements, compile, containsAll, getId, getLocalElementDeclaration, isEmpty, isVoidValidationContext, setId, validate
 
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.SchemaComponent
validate
 

Constructor Detail

Group

public Group(Schema schema,
             javax.xml.transform.SourceLocator locator)
Creates a new Group definition

Parameters:
schema - the XML Schema to which this Group belongs
Method Detail

setName

public void setName(java.lang.String name)
Set the name of the group


iterateParticles

public java.util.Iterator iterateParticles()
Returns an enumeration of all the Particles of this ContentModelGroup

Overrides:
iterateParticles in class Compositor
Returns:
an enumeration of the Particles contained within this ContentModelGroup

getContentModelGroup

public Compositor getContentModelGroup()
Returns the ContentModelGroup for this group Only used for a element

Returns:
the ContentModelGroup for this group

getFingerprint

public int getFingerprint()

setFingerprint

public void setFingerprint(int fingerprint)

getName

public java.lang.String getName()
Returns the name of this Group.

Returns:
the name of this Group.

isReference

public boolean isReference()
Returns true if this model group definition simply references another model group Definition

Returns:
true if this model group definition is a reference

setReference

public void setReference(boolean isRef)
Sets the reference for this Group definition

Parameters:
isRef - true if this group is a reference

getStructureType

public short getStructureType()
Returns the type of this Schema Structure

Overrides:
getStructureType in class Compositor
Returns:
the type of this Schema Structure

isEmptiable

public boolean isEmptiable()
Determine if empty content is allowed

Specified by:
isEmptiable in interface Particle

fixup

public boolean fixup(Schema schema)
              throws SchemaException
Fixup the reference to the referenced group

Specified by:
fixup in interface SchemaComponent
Overrides:
fixup in class Compositor
Parameters:
schema - The schema is used for reporting errors
Returns:
true if all is well, false if errors found
SchemaException

lookForCycles

public void lookForCycles(Schema schema,
                          java.util.Stack references)
                   throws SchemaException
This method is called to look for cycles. The object implementing this method is required (a) to raise an exception if the object itself appears in the list of references, (b) to add itself to the list of references, and (c) to call the lookForCycles method on all the objects that it references.

Specified by:
lookForCycles in interface CircularityChecker
Overrides:
lookForCycles in class Compositor
Parameters:
references - A list of objects that contain direct or indirect references to this object, and that must therefore not be referred to from this object.
Throws:
SchemaException

getReference

public Group getReference()
Returns the group that this group object is a reference to

Returns:
the reference if any

validate

public boolean validate(javax.xml.transform.ErrorListener errorListener)
                 throws javax.xml.transform.TransformerException
Checks the validity of this Schema defintion.

Throws:
javax.xml.transform.TransformerException

setSchema

public void setSchema(Schema schema)
Sets the Schema that contains this group.

Parameters:
schema - the Schema that contains this group.


Stylus Studio features integrated development and debugging support for Saxon in the XQuery editor and XSLT editor.