Package org.exolab.castor.xml.schema
Interface ContentModelGroup
-
- All Known Implementing Classes:
ComplexType,ContentModelGroupImpl,Group,ModelGroup
public interface ContentModelGroupAn 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 voidaddElementDecl(ElementDecl elementDecl)Adds the given ElementDecl to this ContentModelGroup.voidaddGroup(Group group)Adds the givenGroupto thisContentModelGroup.voidaddGroup(ModelGroup group)Adds the givenModelGroupdefinition to thisContentModelGroup.voidaddWildcard(Wildcard wilcard)Adds the givenWildcardto thisContentModelGroup.java.util.Enumerationenumerate()Returns an enumeration of all theParticles contained within thisContentModelGroup.ElementDeclgetElementDecl(java.lang.String name)Returns the element declaration with the given name, or null if no element declaration with that name exists in thisContentModelGroup.intgetMaxOccurs()Returns the maximum number of occurrences that this ContentModelGroup may appear.intgetMinOccurs()Returns the minimum number of occurrences that this ContentModelGroup must appear.ParticlegetParticle(int index)Returns theParticleat the specified index.intgetParticleCount()Returns the number of particles contained within thisContentModelGroup.booleanremoveElementDecl(ElementDecl elementDecl)Removes the given ElementDecl from this ContentModelGroup.booleanremoveGroup(Group group)Removes the givenGroupfrom thisContentModelGroup.booleanremoveGroup(ModelGroup group)Removes the givenModelGroupdefinition from thisContentModelGroup.booleanremoveWildcard(Wildcard wildcard)Removes the givenWildcardfrom 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 givenGroupto 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 givenGroupfrom 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 givenModelGroupdefinition 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 givenModelGroupdefinition from thisContentModelGroup.- Parameters:
group- theModelGroupdefinition to remove.- Returns:
- true if the group has been successfully removed, false otherwise.
-
addWildcard
void addWildcard(Wildcard wilcard) throws SchemaException
Adds the givenWildcardto thisContentModelGroup.- Parameters:
wilcard- theWildcardto add- Throws:
SchemaException- when theWildcardis <anyAttribute> and not <any>
-
removeWildcard
boolean removeWildcard(Wildcard wildcard)
Removes the givenWildcardfrom thisContentModelGroup.
-
enumerate
java.util.Enumeration enumerate()
Returns an enumeration of all theParticles contained within thisContentModelGroup.- Returns:
- an enumeration of all the
Particles 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
ElementDeclwith 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
-
-