Class ModelGroup
java.lang.Object
org.exolab.castor.xml.schema.Structure
org.exolab.castor.xml.schema.Annotated
org.exolab.castor.xml.schema.Particle
org.exolab.castor.xml.schema.Group
org.exolab.castor.xml.schema.ModelGroup
- All Implemented Interfaces:
Serializable, ContentModelGroup, Referable
An XML Schema ModelGroup : invalid input: '<'xsd:group>
- Version:
- $Revision: 6230 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Keith Visco
- See Also:
-
Field Summary
Fields inherited from class Particle
UNBOUNDEDModifier and TypeFieldDescriptionstatic intA constant to represent an UNBOUNDED particleFields inherited from class 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, WILDCARDModifier and TypeFieldDescriptionstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final shortstatic final short -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new ModelGroup, with no nameModelGroup(String name, Schema schema) Creates a new ModelGroup with the given nameModelGroup(Schema schema) Creates a new ModelGroup definition -
Method Summary
Modifier and TypeMethodDescriptionvoidaddModelGroup(ModelGroup modelGroup) Adds the given ModelGroup to this ModelGroupReturns an enumeration of all the Particles of this ContentModelGroupReturns the ContentModelGroup for this group Only used for aelement Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+getName()Returns the name of this ModelGroup.getName(boolean ignoreRef) Returns the name of this Model Group definitionReturns the reference if anyReturns the Id used to Refer to this ObjectReturns the schema that contains this modelGroup definitionshortReturns the type of this Schema StructurebooleanReturns true if this ModelGroup is referencing another onebooleanReturns true if this group is a redefinition.booleanReturns true if this model group definition simply references another model group DefinitionvoidSets this Group has redefined.voidsetReference(String reference) Sets the reference for this ModelGroup definitionvoidSets the Schema that contains this group.voidvalidate()Checks the validity of this Schema defintion.Methods inherited from class Group
addElementDecl, addGroup, addGroup, addWildcard, getElementDecl, getId, getOrder, getParent, getParticle, getParticleCount, hasAny, isEmptiable, isModelGroupDefinition, removeElementDecl, removeGroup, removeGroup, removeWildcard, setId, setIsModelGroupDefinition, setName, setOrder, setParentModifier and TypeMethodDescriptionvoidaddElementDecl(ElementDecl elementDecl) Adds the given ElementDecl to this ContentModelGroup.voidAdds the givenGroupto thisContentModelGroup.voidaddGroup(ModelGroup group) Adds the givenModelGroupdefinition to thisContentModelGroup.voidaddWildcard(Wildcard wildcard) Adds the givenWildcardto thisContentModelGroup.getElementDecl(String name) Returns the element declaration with the given name, or null if no element declaration with that name exists in thisContentModelGroup.getId()Returns the ID for thisGroup.getOrder()Returns the compositor for thisGroup.Returns the parent of this Group, this value may be null if no parent has been set.getParticle(int index) Returns theParticleat the specified index.intReturns the number of particles contained within thisContentModelGroup.booleanhasAny()A helper method that returns true if this group contains an <any> element.booleanIndicates whether thisParticleis 'emptiable'booleanDeprecated.booleanremoveElementDecl(ElementDecl element) 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.voidSets the ID for thisGroup.voidsetIsModelGroupDefinition(boolean isModelGroupDefinition) Deprecated.Since Castor 0.9.2, to handle properly theelement the class ModelGroup has been created voidSets the name of thisGroup.voidprotected voidSets the parent for thisGroup.Methods inherited from class Particle
getMaxOccurs, getMinOccurs, isMaxOccursSet, isMinOccursSet, setMaxOccurs, setMinOccursModifier and TypeMethodDescriptionfinal intReturns the maximum number of occurances that this CMParticle may appearfinal intReturns the minimum number of occurances that this CMParticle must appearprotected final booleanIndicates whetehr maxOccurs has been set.protected final booleanIndicates whether minOccurs has been set.final voidsetMaxOccurs(int maxOccurs) Sets the maximum number of occurances that this CMParticle must appear within it's parent contextfinal voidsetMinOccurs(int minOccurs) Sets the minimum number of occurances that this CMParticle must appear within it's parent contextMethods inherited from class Annotated
addAnnotation, getAnnotations, removeAnnotationModifier and TypeMethodDescriptionvoidaddAnnotation(Annotation annotation) Adds the given Annotation to this Annotated Structure.Returns an Enumeration of the Annotations contained within this Annotated type.voidremoveAnnotation(Annotation annotation) Removes the given Annotation from this Annotated Structure.Methods inherited from class Structure
isValidModifier and TypeMethodDescriptionbooleanisValid()Calls validate() to determine if this Schema Definition is valid.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentModelGroup
getMaxOccurs, getMinOccursModifier and TypeMethodDescriptionintReturns the maximum number of occurrences that this ContentModelGroup may appear.intReturns the minimum number of occurrences that this ContentModelGroup must appear.
-
Constructor Details
-
ModelGroup
public ModelGroup()Creates a new ModelGroup, with no name -
ModelGroup
Creates a new ModelGroup definition- Parameters:
schema- the XML Schema to which this ModelGroup belongs
-
ModelGroup
-
-
Method Details
-
addModelGroup
Adds the given ModelGroup to this ModelGroup- Parameters:
modelGroup- the ModelGroup to add to this ModelGroup
-
enumerate
Returns an enumeration of all the Particles of this ContentModelGroup- Specified by:
enumeratein interfaceContentModelGroup- Overrides:
enumeratein classGroup- Returns:
- an enumeration of the Particles contained within this ContentModelGroup
- See Also:
-
getDeclarations
Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+ -
getContentModelGroup
Returns the ContentModelGroup for this group Only used for aelement - Overrides:
getContentModelGroupin classGroup- Returns:
- the ContentModelGroup for this group
-
getName
-
getName
Returns the name of this Model Group definition- Parameters:
ignoreRef- If True the name of the referenced model group (if specified) is returned- Returns:
- the name of this element declaration
-
isReference
public boolean isReference()Returns true if this model group definition simply references another model group Definition- Returns:
- true if this model group definition is a reference
-
setRedefined
public void setRedefined()Sets this Group has redefined. -
isRedefined
public boolean isRedefined()Returns true if this group is a redefinition.- Returns:
- true if this group is a redefinition.
-
setReference
Sets the reference for this ModelGroup definition- Parameters:
reference- the name of the ModelGroup that this definition references
-
getStructureType
public short getStructureType()Returns the type of this Schema Structure- Overrides:
getStructureTypein classGroup- Returns:
- the type of this Schema Structure
- See Also:
-
getReferenceId
Returns the Id used to Refer to this Object- Specified by:
getReferenceIdin interfaceReferable- Overrides:
getReferenceIdin classGroup- Returns:
- the Id used to Refer to this Object
- See Also:
-
getReference
-
hasReference
public boolean hasReference()Returns true if this ModelGroup is referencing another one- Returns:
- true if this ModelGroup is referencing another one
-
validate
Checks the validity of this Schema defintion.- Overrides:
validatein classGroup- Throws:
ValidationException- when this Schema definition is invalid.
-
getSchema
Returns the schema that contains this modelGroup definition -
setSchema
Sets the Schema that contains this group.- Parameters:
schema- the Schema that contains this group.
-
ModelGrouphas been created