org.exolab.castor.xml.schema
Interface ContentModelGroup

All Known Implementing Classes:
ComplexType, ContentModelGroupImpl, Group, ModelGroup

public interface ContentModelGroup

An XML Schema ModelGroup

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:29 $
Author:
Keith Visco

Method Summary
 void addElementDecl(ElementDecl elementDecl)
          Adds the given ElementDecl to this ContentModelGroup
 void addGroup(Group group)
          Adds the given Group to this ContentModelGroup
 void addGroup(ModelGroup group)
          Adds the given ModelGroup Definition to this ContentModelGroup
 void addWildcard(Wildcard wilcard)
          Adds the given wildcard to this ContentModelGroup
 java.util.Enumeration enumerate()
          Returns an enumeration of all the Particles contained within this ContentModelGroup
 ElementDecl getElementDecl(java.lang.String name)
          Returns the element declaration with the given name, or null if no element declaration with that name exists in this ContentModelGroup.
 int getMaxOccurs()
          Returns the maximum number of occurances that this ContentModelGroup may appear
 int getMinOccurs()
          Returns the minimum number of occurances that this ContentModelGroup must appear
 Particle getParticle(int index)
          Returns the Particle at the specified index
 int getParticleCount()
          Returns the number of particles contained within this ContentModelGroup
 boolean removeElementDecl(ElementDecl elementDecl)
          Removes the given ElementDecl from this ContentModelGroup.
 boolean removeGroup(Group group)
          Removes the given Group from this ContentModelGroup.
 boolean removeGroup(ModelGroup group)
          Removes the given ModelGroup Definition from this ContentModelGroup.
 boolean removeWildcard(Wildcard wildcard)
          Removes the given Wildcard from this ContentModelGroup.
 

Method Detail

addElementDecl

void addElementDecl(ElementDecl elementDecl)
                    throws SchemaException
Adds the given ElementDecl to this ContentModelGroup

Parameters:
elementDecl - the ElementDecl to add
Throws:
SchemaException - when an ElementDecl already exists with the same name as the given ElementDecl

removeElementDecl

boolean removeElementDecl(ElementDecl elementDecl)
Removes the given ElementDecl from this ContentModelGroup.

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

addGroup

void addGroup(Group group)
              throws SchemaException
Adds the given Group to this ContentModelGroup

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

removeGroup

boolean removeGroup(Group group)
Removes the given Group from this ContentModelGroup.

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

addGroup

void addGroup(ModelGroup group)
              throws SchemaException
Adds the given ModelGroup Definition to this ContentModelGroup

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

removeGroup

boolean removeGroup(ModelGroup group)
Removes the given ModelGroup Definition from this ContentModelGroup.

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

addWildcard

void addWildcard(Wildcard wilcard)
                 throws SchemaException
Adds the given wildcard to this ContentModelGroup

Parameters:
wilcard - the wilcard to add
Throws:
SchemaException - when the wilcard is and not

removeWildcard

boolean removeWildcard(Wildcard wildcard)
Removes the given Wildcard from this ContentModelGroup.

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

enumerate

java.util.Enumeration enumerate()
Returns an enumeration of all the Particles contained within this ContentModelGroup

Returns:
an enumeration of all the Particels contained within this ContentModelGroup

getElementDecl

ElementDecl getElementDecl(java.lang.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.

getMaxOccurs

int getMaxOccurs()
Returns the maximum number of occurances that this ContentModelGroup may appear

Returns:
the maximum number of occurances that this ContentModelGroup may appear. A non positive (n < 1) value indicates that the value is unspecified (ie. unbounded).

getMinOccurs

int getMinOccurs()
Returns the minimum number of occurances that this ContentModelGroup must appear

Returns:
the minimum number of occurances that this ContentModelGroup must appear A negative (n < 0) value indicates that the value is unspecified.

getParticleCount

int getParticleCount()
Returns the number of particles contained within this ContentModelGroup

Returns:
the number of particles

getParticle

Particle getParticle(int index)
Returns the Particle at the specified index

Parameters:
index - the index of the particle to return


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