Class ModelGroup

All Implemented Interfaces:
Serializable, ContentModelGroup, Referable

public class ModelGroup extends Group
An XML Schema ModelGroup : invalid input: '<'xsd:group>
Version:
$Revision: 6230 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Keith Visco
See Also:
  • Constructor Details

    • ModelGroup

      public ModelGroup()
      Creates a new ModelGroup, with no name
    • ModelGroup

      public ModelGroup(Schema schema)
      Creates a new ModelGroup definition
      Parameters:
      schema - the XML Schema to which this ModelGroup belongs
    • ModelGroup

      public ModelGroup(String name, Schema schema)
      Creates a new ModelGroup with the given name
      Parameters:
      name - of the ModelGroup
  • Method Details

    • addModelGroup

      public void addModelGroup(ModelGroup modelGroup)
      Adds the given ModelGroup to this ModelGroup
      Parameters:
      modelGroup - the ModelGroup to add to this ModelGroup
    • enumerate

      public Enumeration enumerate()
      Returns an enumeration of all the Particles of this ContentModelGroup
      Specified by:
      enumerate in interface ContentModelGroup
      Overrides:
      enumerate in class Group
      Returns:
      an enumeration of the Particles contained within this ContentModelGroup
      See Also:
    • getDeclarations

      public Enumeration getDeclarations()
      Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+
    • getContentModelGroup

      public ContentModelGroup getContentModelGroup()
      Returns the ContentModelGroup for this group Only used for a element
      Overrides:
      getContentModelGroup in class Group
      Returns:
      the ContentModelGroup for this group
    • getName

      public String getName()
      Returns the name of this ModelGroup.
      Overrides:
      getName in class Group
      Returns:
      the name of this ModelGroup.
    • getName

      public String getName(boolean ignoreRef)
      Returns the name of this Model Group definition
      Parameters:
      ignoreRef - If True the name of the referenced model group (if specified) is returned
      Returns:
      the name of this element declaration
    • 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
    • setRedefined

      public void setRedefined()
      Sets this Group has redefined.
    • isRedefined

      public boolean isRedefined()
      Returns true if this group is a redefinition.
      Returns:
      true if this group is a redefinition.
    • setReference

      public void setReference(String reference)
      Sets the reference for this ModelGroup definition
      Parameters:
      reference - the name of the ModelGroup that this definition references
    • getStructureType

      public short getStructureType()
      Returns the type of this Schema Structure
      Overrides:
      getStructureType in class Group
      Returns:
      the type of this Schema Structure
      See Also:
    • getReferenceId

      public String getReferenceId()
      Returns the Id used to Refer to this Object
      Specified by:
      getReferenceId in interface Referable
      Overrides:
      getReferenceId in class Group
      Returns:
      the Id used to Refer to this Object
      See Also:
    • getReference

      public ModelGroup getReference()
      Returns the reference if any
      Returns:
      the reference if any
    • hasReference

      public boolean hasReference()
      Returns true if this ModelGroup is referencing another one
      Returns:
      true if this ModelGroup is referencing another one
    • validate

      public void validate() throws ValidationException
      Checks the validity of this Schema defintion.
      Overrides:
      validate in class Group
      Throws:
      ValidationException - when this Schema definition is invalid.
    • getSchema

      public Schema getSchema()
      Returns the schema that contains this modelGroup definition
    • setSchema

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