|
||||||||||
| 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(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 ContentModelGroup. |
void |
addWildcard(Wildcard wildcard)
Adds the given Wildcard to this ContentModelGroup. |
Enumeration<Annotated> |
enumerate()
Returns an enumeration of all the Particles contained
within this ContentModelGroup. |
ContentModelGroup |
getContentModelGroup()
Returns the ContentModelGroup for this group. |
ElementDecl |
getElementDecl(String name)
Returns the element declaration with the given name, or null if no element declaration with that name exists in this ContentModelGroup. |
String |
getId()
Returns the ID for this Group. |
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. |
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 <any> element. |
boolean |
isEmptiable()
Indicates whether this Particle is 'emptiable' |
boolean |
isModelGroupDefinition()
Deprecated. Since Castor 0.9.2, to handle properly the ModelGroup has been created |
boolean |
removeElementDecl(ElementDecl element)
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. |
void |
setId(String id)
Sets the ID for this Group. |
void |
setIsModelGroupDefinition(boolean isModelGroupDefinition)
Deprecated. Since Castor 0.9.2, to handle properly the |
void |
setName(String name)
Sets the name of this Group. |
void |
setOrder(Order order)
Sets the Order 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, isMaxOccursSet, isMinOccursSet, 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()
Group, with no name.
public Group(String name)
Group with the given name.
name - of the Group| Method Detail |
|---|
public void addWildcard(Wildcard wildcard)
throws SchemaException
Wildcard to this ContentModelGroup.
addWildcard in interface ContentModelGroupwildcard - the Wildcard to add
SchemaException - when the Wildcard is <anyAttribute> and
not <any>ContentModelGroup.addWildcard(org.exolab.castor.xml.schema.Wildcard)public boolean removeWildcard(Wildcard wildcard)
Wildcard from this ContentModelGroup.
removeWildcard in interface ContentModelGroupwildcard - the Wildcard to remove.
Wildcard has been successfully removed, false otherwise.ContentModelGroup.removeWildcard(org.exolab.castor.xml.schema.Wildcard)public ContentModelGroup getContentModelGroup()
ContentModelGroup for this group.
Only used for a
public String getId()
Group.
Group, or null if no ID is presentpublic String getName()
Group, or null if no name was defined.
Group, or null if no name was definedpublic Order getOrder()
Group.
Grouppublic Structure getParent()
public void setIsModelGroupDefinition(boolean isModelGroupDefinition)
ModelGrouppublic boolean isModelGroupDefinition()
ModelGroup has been created
ModelGrouppublic String getReferenceId()
getReferenceId in interface ReferableReferablepublic void setName(String name)
Group.
name - the new name for this Grouppublic void setId(String id)
Group.
id - the ID for this Grouppublic void setOrder(Order order)
Order for this Group.
order - the type of Order that this Group is restricted to
public void addElementDecl(ElementDecl elementDecl)
throws SchemaException
addElementDecl in interface ContentModelGroupelementDecl - the ElementDecl to add
SchemaException - when an ElementDecl already
exists with the same name as the given ElementDeclContentModelGroup.addElementDecl(org.exolab.castor.xml.schema.ElementDecl)public boolean removeElementDecl(ElementDecl element)
removeElementDecl in interface ContentModelGroupelement - the ElementDecl to remove.
ContentModelGroup.removeElementDecl(org.exolab.castor.xml.schema.ElementDecl)
public void addGroup(Group group)
throws SchemaException
Group to this ContentModelGroup.
addGroup in interface ContentModelGroupgroup - the Group to add
SchemaException - when a group with the same name as the
specified group already exists in the current scopeContentModelGroup.addGroup(org.exolab.castor.xml.schema.Group)public boolean removeGroup(Group group)
Group from this ContentModelGroup.
removeGroup in interface ContentModelGroupgroup - the Group to remove.
ContentModelGroup.removeGroup(org.exolab.castor.xml.schema.Group)
public void addGroup(ModelGroup group)
throws SchemaException
ModelGroup definition to this ContentModelGroup.
addGroup in interface ContentModelGroupgroup - the ModelGroup to add
SchemaException - when a group with the same name as the
specified group already exists in the current scopeContentModelGroup.addGroup(org.exolab.castor.xml.schema.ModelGroup)public boolean removeGroup(ModelGroup group)
ModelGroup definition from this ContentModelGroup.
removeGroup in interface ContentModelGroupgroup - the ModelGroup definition to remove.
ContentModelGroup.removeGroup(org.exolab.castor.xml.schema.ModelGroup)public Enumeration<Annotated> enumerate()
Particles contained
within this ContentModelGroup.
enumerate in interface ContentModelGroupParticles contained
within this ContentModelGroupContentModelGroup.enumerate()public ElementDecl getElementDecl(String name)
ContentModelGroup.
getElementDecl in interface ContentModelGroupname - the name of the element.
ElementDecl with the given name, or null if no
ElementDecl exists in this ContentModelGroup.ContentModelGroup.getElementDecl(java.lang.String)public Particle getParticle(int index)
Particle at the specified index.
getParticle in interface ContentModelGroupindex - the index of the Particle to return
ContentModelGroup.getParticle(int)public int getParticleCount()
ContentModelGroup.
getParticleCount in interface ContentModelGroupContentModelGroup.getParticleCount()public short getStructureType()
getStructureType in class StructureStructure.getStructureType()public boolean hasAny()
public void validate()
throws ValidationException
Group defintion.
validate in class StructureValidationException - when this Group definition
is invalid.protected void setParent(Structure parent)
Group.
parent - the parent Structure for this Grouppublic boolean isEmptiable()
Particle is 'emptiable'
isEmptiable in class Particle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||