Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.saxonica.schema
Class ModelGroupDefinition

    java.lang.Object
      com.saxonica.schema.SchemaStructure
          com.saxonica.schema.AbstractParticle
              com.saxonica.schema.Compositor
                  com.saxonica.schema.ModelGroupDefinition

All Implemented Interfaces:
  Particle, SerializableSchemaComponent, Term, UserSchemaComponent, Serializable, SourceLocator, SchemaComponent

    public class ModelGroupDefinition

extends Compositor

A Model Group Definition: a schema component corresponding to a top-level (named) xs:group element in a schema document.

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.saxonica.schema.AbstractParticle
`UNBOUNDED`

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`

Constructor Summary
`ModelGroupDefinition(PreparedSchema schema, SourceLocator locator)` Creates a new Group definition

Method Summary
`int` | `getComponentTypeCode()` Get a unique number identifying the type of component
`int` | `getFingerprint()`
`String` | `getName()` Returns the name of this Group.
`boolean` | `isEmptiable()` Determine if empty content is allowed
`boolean` | `isPointless(Particle container)` Test whether the compositor is pointless, as described in XML Schema Part 1 Schema Component Constraint: Particle Valid (Restriction)
`boolean` | `isSameGroup(ModelGroupDefinition other)` Test whether this is the same type as another type.
`void` | `lookForCycles(Stack references, SchemaCompiler compiler)` This method is called to look for cycles.
`void` | `serialize(SchemaSerializer serializer)` Serialize the schema component
`void` | `setFingerprint(int fingerprint)`
`void` | `setName(String name)` Set the name of the group
`void` | `setRedefinedModelGroupDefinition(ModelGroupDefinition other)` Set the model group definition that this one redefines.
`boolean` | `validate(SchemaCompiler compiler)` Checks the validity of this Schema definition.

Methods inherited from class com.saxonica.schema.Compositor
`addParticle, compile, containsAll, fixup, gatherAllPermittedElements, getContentModelSize, getElementParticleCardinality, getElementParticleType, getListOfParticles, getSimplifiedContentModel, getTerm, isEmpty, iterateParticles, setContentModel`

Methods inherited from class com.saxonica.schema.AbstractParticle
`computeParticleCardinality, getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs`

Methods inherited from class com.saxonica.schema.SchemaStructure
`getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, 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 net.sf.saxon.type.SchemaComponent
`getValidationStatus`

Constructor Detail

### ModelGroupDefinition

    public ModelGroupDefinition(PreparedSchema schema,
                                SourceLocator locator)

  Creates a new Group definition

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

Method Detail

### setName

    public void setName(String name)

  Set the name of the group

### setRedefinedModelGroupDefinition

    public void setRedefinedModelGroupDefinition(ModelGroupDefinition other)

  Set the model group definition that this one redefines. Only set if this is a redefining model group that does not contain a self-reference; in this case validate() must check that it is a valid refinement

### getFingerprint

    public int getFingerprint()

### setFingerprint

    public void setFingerprint(int fingerprint)

### getName

    public String getName()

  Returns the name of this Group.

  Returns:
    the name of this Group.

### isEmptiable

    public boolean isEmptiable()
                        throws UnresolvedReferenceException

  Determine if empty content is allowed

  Throws:
    `UnresolvedReferenceException`

### isPointless

    public boolean isPointless(Particle container)

  Test whether the compositor is pointless, as described in XML Schema Part 1 Schema Component Constraint: Particle Valid (Restriction)

  Specified by:
    `isPointless` in interface `Particle`
  Overrides:
    `isPointless` in class `Compositor`

### lookForCycles

    public void lookForCycles(Stack references,
                              SchemaCompiler compiler)
                       throws SchemaException,
                              UnresolvedReferenceException

  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 `UserSchemaComponent`
  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.
    `compiler` -
  Throws:
    `SchemaException`
    `UnresolvedReferenceException`

### validate

    public boolean validate(SchemaCompiler compiler)
                     throws SchemaException,
                            ValidationException

  Checks the validity of this Schema definition.

  Specified by:
    `validate` in interface `UserSchemaComponent`
  Overrides:
    `validate` in class `Compositor`
  Returns:
    true when this Schema definition is valid, otherwise false.
  Throws:
    `SchemaException`
    `ValidationException`

### isSameGroup

    public boolean isSameGroup(ModelGroupDefinition other)

  Test whether this is the same type as another type. They are considered to be the same type if they are derived from the same type definition in the original XML representation (which can happen when there are multiple includes of the same file)

### serialize

    public void serialize(SchemaSerializer serializer)
                   throws IOException

  Serialize the schema component

  Throws:
    `IOException`

### getComponentTypeCode

    public int getComponentTypeCode()

  Get a unique number identifying the type of component

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Michael H. Kay. All rights reserved.