org.exolab.castor.xml.schema

Class ModelGroup

public class ModelGroup extends Group

An XML Schema ModelGroup :

Version: $Revision: 1.2 $ $Date: 2004/09/21 14:04:35 $

Author: Keith Visco

Constructor Summary
ModelGroup()
Creates a new ModelGroup, with no name
ModelGroup(Schema schema)
Creates a new ModelGroup definition
ModelGroup(String name, Schema schema)
Creates a new ModelGroup with the given name
Method Summary
voidaddModelGroup(ModelGroup modelGroup)
Adds the given ModelGroup to this ModelGroup
Enumerationenumerate()
Returns an enumeration of all the Particles of this ContentModelGroup
ContentModelGroupgetContentModelGroup()
Returns the ContentModelGroup for this group Only used for a element
EnumerationgetDeclarations()
Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+
StringgetName()
Returns the name of this ModelGroup.
StringgetName(boolean ignoreRef)
Returns the name of this Model Group definition
ModelGroupgetReference()
Returns the reference if any
StringgetReferenceId()
Returns the Id used to Refer to this Object
SchemagetSchema()
Returns the schema that contains this modelGroup definition
shortgetStructureType()
Returns the type of this Schema Structure
booleanhasReference()
Returns true if this ModelGroup is referencing another one
booleanisRedefined()
Returns true if this group is a redefinition.
booleanisReference()
Returns true if this model group definition simply references another model group Definition
voidsetRedefined()
Sets this Group has redefined.
voidsetReference(String reference)
Sets the reference for this ModelGroup definition
voidsetSchema(Schema schema)
Sets the Schema that contains this group.
voidvalidate()
Checks the validity of this Schema defintion.

Constructor Detail

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 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 Enumeration enumerate()
Returns an enumeration of all the Particles of this ContentModelGroup

Returns: an enumeration of the Particles contained within this ContentModelGroup

getContentModelGroup

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

Returns: the ContentModelGroup for this group

getDeclarations

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

getName

public String getName()
Returns the name of this ModelGroup.

Returns: the name of this ModelGroup.

getName

public String getName(boolean ignoreRef)
Returns the name of this Model Group definition

Parameters: ingoreRef If True the name of the referenced model group (if specified) is returned

Returns: the name of this element declaration

getReference

public ModelGroup getReference()
Returns the reference if any

UNKNOWN: the reference if any

getReferenceId

public String getReferenceId()
Returns the Id used to Refer to this Object

Returns: the Id used to Refer to this Object

See Also:

getSchema

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

getStructureType

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

Returns: the type of this Schema Structure

hasReference

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

UNKNOWN: true if this ModelGroup is referencing another one

isRedefined

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

Returns: true if this group is a redefinition.

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.

setReference

public void setReference(String reference)
Sets the reference for this ModelGroup definition

Parameters: reference the name of the ModelGroup that this definition references

setSchema

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

Parameters: schema the Schema that contains this group.

validate

public void validate()
Checks the validity of this Schema defintion.

Throws: ValidationException when this Schema definition is invalid.

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