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