|
||||||||
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 ContentModelGroup . |
void |
addWildcard(Wildcard wildcard)
Adds the given Wildcard to this ContentModelGroup . |
java.util.Enumeration<Annotated> |
enumerate()
Returns an enumeration of all the Particle s contained
within this ContentModelGroup . |
ContentModelGroup |
getContentModelGroup()
Returns the ContentModelGroup for this group. |
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 <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(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 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(java.lang.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 ContentModelGroup
wildcard
- 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 ContentModelGroup
wildcard
- 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 java.lang.String getId()
Group
.
Group
, or null if no ID is presentpublic java.lang.String getName()
Group
, or null if no name was defined.
Group
, or null if no name was definedpublic Order getOrder()
Group
.
Group
public Structure getParent()
public void setIsModelGroupDefinition(boolean isModelGroupDefinition)
ModelGroup
public boolean isModelGroupDefinition()
ModelGroup
has been created
ModelGroup
public java.lang.String getReferenceId()
getReferenceId
in interface Referable
Referable
public void setName(java.lang.String name)
Group
.
name
- the new name for this Group
public void setId(java.lang.String id)
Group
.
id
- the ID for this Group
public void setOrder(Order order)
Order
for this Group
.
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 ElementDeclContentModelGroup.addElementDecl(org.exolab.castor.xml.schema.ElementDecl)
public boolean removeElementDecl(ElementDecl element)
removeElementDecl
in interface ContentModelGroup
element
- 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 ContentModelGroup
group
- 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 ContentModelGroup
group
- 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 ContentModelGroup
group
- 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 ContentModelGroup
group
- the ModelGroup
definition to remove.
ContentModelGroup.removeGroup(org.exolab.castor.xml.schema.ModelGroup)
public java.util.Enumeration<Annotated> enumerate()
Particle
s contained
within this ContentModelGroup
.
enumerate
in interface ContentModelGroup
Particle
s contained
within this ContentModelGroup
ContentModelGroup.enumerate()
public ElementDecl getElementDecl(java.lang.String name)
ContentModelGroup
.
getElementDecl
in interface ContentModelGroup
name
- 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 ContentModelGroup
index
- the index of the Particle
to return
ContentModelGroup.getParticle(int)
public int getParticleCount()
ContentModelGroup
.
getParticleCount
in interface ContentModelGroup
ContentModelGroup.getParticleCount()
public short getStructureType()
getStructureType
in class Structure
Structure.getStructureType()
public boolean hasAny()
public void validate() throws ValidationException
Group
defintion.
validate
in class Structure
ValidationException
- when this Group
definition
is invalid.protected void setParent(Structure parent)
Group
.
parent
- the parent Structure
for this Group
public 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 |