Package org.exolab.castor.xml.schema
Interface ContentModelGroup
-
- All Known Implementing Classes:
ComplexType
,ContentModelGroupImpl
,Group
,ModelGroup
public interface ContentModelGroup
An XML Schema ModelGroup.- Version:
- $Revision: 7996 $ $Date: 2006-04-14 04:14:43 -0600 (Fri, 14 Apr 2006) $
- Author:
- Keith Visco
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addElementDecl(ElementDecl elementDecl)
Adds the given ElementDecl to this ContentModelGroup.void
addGroup(Group group)
Adds the givenGroup
to thisContentModelGroup
.void
addGroup(ModelGroup group)
Adds the givenModelGroup
definition to thisContentModelGroup
.void
addWildcard(Wildcard wilcard)
Adds the givenWildcard
to thisContentModelGroup
.java.util.Enumeration
enumerate()
Returns an enumeration of all theParticle
s contained within thisContentModelGroup
.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 thisContentModelGroup
.int
getMaxOccurs()
Returns the maximum number of occurrences that this ContentModelGroup may appear.int
getMinOccurs()
Returns the minimum number of occurrences that this ContentModelGroup must appear.Particle
getParticle(int index)
Returns theParticle
at the specified index.int
getParticleCount()
Returns the number of particles contained within thisContentModelGroup
.boolean
removeElementDecl(ElementDecl elementDecl)
Removes the given ElementDecl from this ContentModelGroup.boolean
removeGroup(Group group)
Removes the givenGroup
from thisContentModelGroup
.boolean
removeGroup(ModelGroup group)
Removes the givenModelGroup
definition from thisContentModelGroup
.boolean
removeWildcard(Wildcard wildcard)
Removes the givenWildcard
from thisContentModelGroup
.
-
-
-
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 givenGroup
to thisContentModelGroup
.- 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 givenGroup
from thisContentModelGroup
.- 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 givenModelGroup
definition to thisContentModelGroup
.- 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 givenModelGroup
definition from thisContentModelGroup
.- Parameters:
group
- theModelGroup
definition to remove.- Returns:
- true if the group has been successfully removed, false otherwise.
-
addWildcard
void addWildcard(Wildcard wilcard) throws SchemaException
Adds the givenWildcard
to thisContentModelGroup
.- Parameters:
wilcard
- theWildcard
to add- Throws:
SchemaException
- when theWildcard
is <anyAttribute> and not <any>
-
removeWildcard
boolean removeWildcard(Wildcard wildcard)
Removes the givenWildcard
from thisContentModelGroup
.
-
enumerate
java.util.Enumeration enumerate()
Returns an enumeration of all theParticle
s contained within thisContentModelGroup
.- Returns:
- an enumeration of all the
Particle
s contained within thisContentModelGroup
-
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 thisContentModelGroup
.- Parameters:
name
- the name of the element.- Returns:
- the
ElementDecl
with the given name, or null if no ElementDecl exists in thisContentModelGroup
.
-
getMaxOccurs
int getMaxOccurs()
Returns the maximum number of occurrences that this ContentModelGroup may appear.- Returns:
- the maximum number of occurrences 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 occurrences that this ContentModelGroup must appear.- Returns:
- the minimum number of occurrences 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 thisContentModelGroup
.- Returns:
- the number of particles
-
-