Public Member Functions | Protected Member Functions

org.exolab.castor.xml.schema.Group Class Reference

Inheritance diagram for org.exolab.castor.xml.schema.Group:
org.exolab.castor.xml.schema.Particle org.exolab.castor.xml.schema.ContentModelGroup org.exolab.castor.xml.schema.Referable org.exolab.castor.xml.schema.Annotated org.exolab.castor.xml.schema.Structure org.exolab.castor.xml.schema.ModelGroup

List of all members.

Public Member Functions

 Group ()
 Group (String name)
void addWildcard (Wildcard wildcard) throws SchemaException
boolean removeWildcard (Wildcard wildcard)
ContentModelGroup getContentModelGroup ()
String getId ()
String getName ()
Order getOrder ()
Structure getParent ()
void setIsModelGroupDefinition (boolean isModelGroupDefinition)
boolean isModelGroupDefinition ()
String getReferenceId ()
void setName (String name)
void setId (String id)
void setOrder (Order order)
void addElementDecl (ElementDecl elementDecl) throws SchemaException
boolean removeElementDecl (ElementDecl element)
void addGroup (Group group) throws SchemaException
boolean removeGroup (Group group)
void addGroup (ModelGroup group) throws SchemaException
boolean removeGroup (ModelGroup group)
Enumeration enumerate ()
ElementDecl getElementDecl (String name)
Particle getParticle (int index)
int getParticleCount ()
short getStructureType ()
boolean hasAny ()
void validate () throws ValidationException

Protected Member Functions

void setParent (Structure parent)

Detailed Description

An XML Schema Group

Author:
Keith Visco
Version:
Revision:
1.3
Date:
2004/10/01 13:25:21

Constructor & Destructor Documentation

org.exolab.castor.xml.schema.Group.Group (  ) 

Creates a new Group, with no name

org.exolab.castor.xml.schema.Group.Group ( String  name  ) 

Creates a new Group with the given name

Parameters:
name of the Group

Member Function Documentation

void org.exolab.castor.xml.schema.Group.addGroup ( Group  group  )  throws SchemaException

Adds the given Group to this ContentModelGroup

Parameters:
group the Group to add
Exceptions:
SchemaException when a group with the same name as the specified group already exists in the current scope

References org.exolab.castor.xml.schema.ContentModelGroup.addGroup().

Referenced by org.exolab.castor.xml.dtd.Converter.convertContentParticle(), org.exolab.castor.xml.schema.reader.ModelGroupUnmarshaller.endElement(), and org.exolab.castor.xml.schema.reader.GroupUnmarshaller.endElement().

void org.exolab.castor.xml.schema.Group.addGroup ( ModelGroup  group  )  throws SchemaException

Adds the given ModelGroup Definition to this Group

Parameters:
group the ModelGroup to add
Exceptions:
SchemaException when a group with the same name as the specified group already exists in the current scope

References org.exolab.castor.xml.schema.ContentModelGroup.addGroup().

void org.exolab.castor.xml.schema.Group.addWildcard ( Wildcard  wildcard  )  throws SchemaException

Adds a wildcard to this Group model

Parameters:
WildCard the wildcard to add
Exceptions:
SchemaException thrown when the wildcard is an <anyAttribute> element

References org.exolab.castor.xml.schema.ContentModelGroup.addWildcard().

Referenced by org.exolab.castor.xml.dtd.Converter.convertDTDElementToSchemaElement(), and org.exolab.castor.xml.schema.reader.GroupUnmarshaller.endElement().

ContentModelGroup org.exolab.castor.xml.schema.Group.getContentModelGroup (  ) 

Returns the ContentModelGroup for this group Only used for a <group> element

Returns:
the ContentModelGroup for this group

Reimplemented in org.exolab.castor.xml.schema.ModelGroup.

ElementDecl org.exolab.castor.xml.schema.Group.getElementDecl ( String  name  ) 

Returns the element declaration with the given name, or null if no element declaration with that name exists in this ContentModelGroup.

Parameters:
name the name of the element.
Returns:
the ElementDecl with the given name, or null if no ElementDecl exists in this ContentModelGroup.

References org.exolab.castor.xml.schema.ContentModelGroup.getElementDecl().

Referenced by org.exolab.castor.xml.schema.util.XMLInstance2SchemaHandler.endElement().

String org.exolab.castor.xml.schema.Group.getId (  ) 

Returns the ID for this Group

Returns:
the ID for this Group, or null if no ID is present
String org.exolab.castor.xml.schema.Group.getName (  ) 

Returns the name of this Group, or null if no name was defined.

Returns:
the name of this Group, or null if no name was defined

Reimplemented in org.exolab.castor.xml.schema.ModelGroup.

Referenced by org.exolab.castor.builder.GroupNaming.createClassName(), and org.exolab.castor.xml.schema.ContentModelGroupImpl.removeGroup().

Structure org.exolab.castor.xml.schema.Group.getParent (  ) 

Returns the parent of this Group, this value may be null if no parent has been set.

Returns:
the parent Structure of this Group.

Referenced by org.exolab.castor.builder.GroupNaming.createClassName(), org.exolab.castor.xml.schema.Wildcard.getSchema(), and org.exolab.castor.xml.schema.ModelGroup.validate().

String org.exolab.castor.xml.schema.Group.getReferenceId (  ) 

Returns the Id used to Refer to this Object

Returns:
the Id used to Refer to this Object
See also:
Referable

Implements org.exolab.castor.xml.schema.Referable.

Reimplemented in org.exolab.castor.xml.schema.ModelGroup.

short org.exolab.castor.xml.schema.Group.getStructureType (  ) 

Returns the type of this Schema Structure

Returns:
the type of this Schema Structure

Reimplemented in org.exolab.castor.xml.schema.ModelGroup.

Referenced by org.exolab.castor.xml.schema.Group.hasAny().

boolean org.exolab.castor.xml.schema.Group.hasAny (  ) 

A helper method that returns true if this group contains an <any> element.

Returns:
method that returns true if this group contains an <any> element.

References org.exolab.castor.xml.schema.Structure.ELEMENT, org.exolab.castor.xml.schema.ContentModelGroup.enumerate(), and org.exolab.castor.xml.schema.Group.getStructureType().

boolean org.exolab.castor.xml.schema.Group.isModelGroupDefinition (  ) 

Tells if the group is a model group definition

Returns:
true if the group is a model group definition (<group> tag), false otherwise (<all>, <choice>, or <sequence> tags.
Deprecated:
Since Castor 0.9.2, to handle properly the <group> element the class ModelGroup has been created
boolean org.exolab.castor.xml.schema.Group.removeElementDecl ( ElementDecl  element  ) 

Removes the given ElementDecl from this ContentModelGroup.

Parameters:
elementDecl the ElementDecl to remove.
Returns:
true if the element has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeElementDecl().

boolean org.exolab.castor.xml.schema.Group.removeGroup ( Group  group  ) 

Removes the given Group from this Group.

Parameters:
group the Group to remove.
Returns:
true if the group has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeGroup(), and org.exolab.castor.xml.schema.Group.setParent().

boolean org.exolab.castor.xml.schema.Group.removeGroup ( ModelGroup  group  ) 

Removes the given ModelGroup Definition from this Group.

Parameters:
group the ModelGroup Definition to remove.
Returns:
true if the group has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeGroup(), and org.exolab.castor.xml.schema.Group.setParent().

boolean org.exolab.castor.xml.schema.Group.removeWildcard ( Wildcard  wildcard  ) 

Removes the given Wildcard from this Group.

Parameters:
wilcard the Wildcard to remove.
Returns:
true if the wildcard has been successfully removed, false otherwise.

References org.exolab.castor.xml.schema.ContentModelGroup.removeWildcard().

void org.exolab.castor.xml.schema.Group.setId ( String  id  ) 
void org.exolab.castor.xml.schema.Group.setIsModelGroupDefinition ( boolean  isModelGroupDefinition  ) 

Sets if the group is a model group definition

Deprecated:
Since Castor 0.9.2, to handle properly the <group> element the class ModelGroup has been created
void org.exolab.castor.xml.schema.Group.setName ( String  name  ) 
void org.exolab.castor.xml.schema.Group.setParent ( Structure  parent  )  [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties