org.exolab.castor.xml.schema
Class ModelGroup

java.lang.Object
  extended byorg.exolab.castor.xml.schema.Structure
      extended byorg.exolab.castor.xml.schema.Annotated
          extended byorg.exolab.castor.xml.schema.Particle
              extended byorg.exolab.castor.xml.schema.Group
                  extended byorg.exolab.castor.xml.schema.ModelGroup
All Implemented Interfaces:
ContentModelGroup, Referable, java.io.Serializable

public class ModelGroup
extends Group

An XML Schema ModelGroup

Version:
$Revision: 1.10 $ $Date: 2001/10/17 19:06:28 $
Author:
Keith Visco
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.exolab.castor.xml.schema.Particle
UNBOUNDED
 
Fields inherited from class org.exolab.castor.xml.schema.Structure
ANNOTATION, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD
 
Constructor Summary
ModelGroup()
          Creates a new ModelGroup, with no name
ModelGroup(Schema schema)
          Creates a new ModelGroup definition
ModelGroup(java.lang.String name, Schema schema)
          Creates a new ModelGroup with the given name
 
Method Summary
 void addModelGroup(ModelGroup modelGroup)
          Adds the given ModelGroup to this ModelGroup
 java.util.Enumeration enumerate()
          Returns an enumeration of all the Particles of this ContentModelGroup
 java.util.Enumeration getDeclarations()
          Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+
 ModelGroup getReference()
          Returns the reference if any
 java.lang.String getReferenceId()
          Returns the Id used to Refer to this Object
 Schema getSchema()
          Returns the schema that contains this modelGroup definition
 short getStructureType()
          Returns the type of this Schema Structure
 boolean hasReference()
          Returns true if this ModelGroup is referencing another one
 void setReference(java.lang.String reference)
          Sets the reference for this ModelGroup definition
 void validate()
          Checks the validity of this Schema defintion.
 
Methods inherited from class org.exolab.castor.xml.schema.Group
addElementDecl, addGroup, addGroup, addWildcard, getContentModelGroup, getElementDecl, getId, getName, getOrder, getParent, getParticle, getParticleCount, isModelGroupDefinition, removeElementDecl, removeGroup, removeGroup, removeWildcard, setId, setIsModelGroupDefinition, setName, setOrder, setParent
 
Methods inherited from class org.exolab.castor.xml.schema.Particle
getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs
 
Methods inherited from class org.exolab.castor.xml.schema.Annotated
addAnnotation, getAnnotations, removeAnnotation
 
Methods inherited from class org.exolab.castor.xml.schema.Structure
isValid
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.exolab.castor.xml.schema.ContentModelGroup
getMaxOccurs, getMinOccurs
 

Constructor Detail

ModelGroup

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


ModelGroup

public ModelGroup(Schema schema)
Creates a new ModelGroup definition


ModelGroup

public ModelGroup(java.lang.String name,
                  Schema schema)
Creates a new ModelGroup with the given name

Parameters:
name - of the ModelGroup
Method Detail

addModelGroup

public void addModelGroup(ModelGroup modelGroup)
Adds the given ModelGroup to this ModelGroup

Parameters:
modelGroup - the ModelGroup to add to this ModelGroup

enumerate

public java.util.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

getDeclarations

public java.util.Enumeration getDeclarations()
Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+


setReference

public void setReference(java.lang.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

getReferenceId

public java.lang.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:
Referable

getReference

public ModelGroup getReference()
Returns the reference if any


hasReference

public boolean hasReference()
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



Intalio Inc. (C) 1999-2001. All rights reserved http://www.intalio.com