|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.Particle
org.exolab.castor.xml.schema.Group
public class Group
An XML Schema Group
Field Summary |
---|
Fields inherited from class org.exolab.castor.xml.schema.Particle |
---|
UNBOUNDED |
Fields inherited from class org.exolab.castor.xml.schema.Structure |
---|
ANNOTATION, ANYTYPE, APPINFO, ATTRIBUTE, ATTRIBUTE_GROUP, COMPLEX_CONTENT, COMPLEX_TYPE, DOCUMENTATION, ELEMENT, FACET, GROUP, IDENTITY_FIELD, IDENTITY_SELECTOR, KEY, KEYREF, LIST, MODELGROUP, MODELGROUP_REF, REDEFINE, SCHEMA, SIMPLE_CONTENT, SIMPLE_TYPE, UNION, UNIQUE, UNKNOWN, WILDCARD |
Constructor Summary | |
---|---|
Group()
Creates a new Group, with no name |
|
Group(java.lang.String name)
Creates a new Group with the given name |
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 Group |
void |
addWildcard(Wildcard wildcard)
Adds a wildcard to this Group model |
java.util.Enumeration |
enumerate()
Returns an enumeration of all the Particles of this ContentModelGroup |
ContentModelGroup |
getContentModelGroup()
Returns the ContentModelGroup for this group Only used for a |
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. |
java.lang.String |
getId()
Returns the ID for this Group |
java.lang.String |
getName()
Returns the name of this Group, or null if no name was defined. |
Order |
getOrder()
Returns the compositor for this Group |
Structure |
getParent()
Returns the parent of this Group, this value may be null if no parent has been set. |
Particle |
getParticle(int index)
Returns the Particle at the specified index |
int |
getParticleCount()
Returns the number of particles contained within this ContentModelGroup |
java.lang.String |
getReferenceId()
Returns the Id used to Refer to this Object |
short |
getStructureType()
Returns the type of this Schema Structure |
boolean |
hasAny()
A helper method that returns true if this group contains an |
boolean |
isModelGroupDefinition()
Deprecated. Since Castor 0.9.2, to handle properly the |
boolean |
removeElementDecl(ElementDecl element)
Removes the given ElementDecl from this ContentModelGroup. |
boolean |
removeGroup(Group group)
Removes the given Group from this Group. |
boolean |
removeGroup(ModelGroup group)
Removes the given ModelGroup Definition from this Group. |
boolean |
removeWildcard(Wildcard wildcard)
Removes the given Wildcard from this Group. |
void |
setId(java.lang.String id)
Sets the ID for this Group |
void |
setIsModelGroupDefinition(boolean isModelGroupDefinition)
Deprecated. Since Castor 0.9.2, to handle properly the |
void |
setName(java.lang.String name)
Sets the name of this Group |
void |
setOrder(Order order)
Sets the Order option for this Group |
protected void |
setParent(Structure parent)
Sets the parent for this Group |
void |
validate()
Checks the validity of this Group defintion. |
Methods inherited from class org.exolab.castor.xml.schema.Particle |
---|
getMaxOccurs, getMinOccurs, setMaxOccurs, setMinOccurs |
Methods inherited from class org.exolab.castor.xml.schema.Annotated |
---|
addAnnotation, getAnnotations, removeAnnotation |
Methods inherited from class org.exolab.castor.xml.schema.Structure |
---|
isValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.exolab.castor.xml.schema.ContentModelGroup |
---|
getMaxOccurs, getMinOccurs |
Constructor Detail |
---|
public Group()
public Group(java.lang.String name)
name
- of the GroupMethod Detail |
---|
public void addWildcard(Wildcard wildcard) throws SchemaException
addWildcard
in interface ContentModelGroup
WildCard
- the wildcard to add
SchemaException
- thrown when the wildcard
is an public boolean removeWildcard(Wildcard wildcard)
removeWildcard
in interface ContentModelGroup
wilcard
- the Wildcard to remove.
public ContentModelGroup getContentModelGroup()
public java.lang.String getId()
public java.lang.String getName()
public Order getOrder()
public Structure getParent()
public void setIsModelGroupDefinition(boolean isModelGroupDefinition)
public boolean isModelGroupDefinition()
public java.lang.String getReferenceId()
getReferenceId
in interface Referable
Referable
public void setName(java.lang.String name)
name
- the new name for this Grouppublic void setId(java.lang.String id)
id
- the ID for this Grouppublic void setOrder(Order order)
order
- the type of order that this group is restricted topublic void addElementDecl(ElementDecl elementDecl) throws SchemaException
addElementDecl
in interface ContentModelGroup
elementDecl
- the ElementDecl to add
SchemaException
- when an ElementDecl already
exists with the same name as the given ElementDeclpublic boolean removeElementDecl(ElementDecl element)
removeElementDecl
in interface ContentModelGroup
elementDecl
- the ElementDecl to remove.
public void addGroup(Group group) throws SchemaException
addGroup
in interface ContentModelGroup
group
- the Group to add
SchemaException
- when a group with the same name as the
specified group already exists in the current scopepublic boolean removeGroup(Group group)
removeGroup
in interface ContentModelGroup
group
- the Group to remove.
public void addGroup(ModelGroup group) throws SchemaException
addGroup
in interface ContentModelGroup
group
- the ModelGroup to add
SchemaException
- when a group with the same name as the
specified group already exists in the current scopepublic boolean removeGroup(ModelGroup group)
removeGroup
in interface ContentModelGroup
group
- the ModelGroup Definition to remove.
public java.util.Enumeration enumerate()
enumerate
in interface ContentModelGroup
public ElementDecl getElementDecl(java.lang.String name)
getElementDecl
in interface ContentModelGroup
name
- the name of the element.
public Particle getParticle(int index)
getParticle
in interface ContentModelGroup
index
- the index of the particle to returnpublic int getParticleCount()
getParticleCount
in interface ContentModelGroup
public short getStructureType()
getStructureType
in class Structure
public boolean hasAny()
public void validate() throws ValidationException
validate
in class Structure
ValidationException
- when this Group definition
is invalid.protected void setParent(Structure parent)
parent
- the parent Structure for this Group
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |