Package org.exolab.castor.xml.schema
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:
java.io.Serializable,ContentModelGroup,Referable
public class ModelGroup extends Group
An XML Schema ModelGroup :- Version:
- $Revision: 6230 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
- Author:
- Keith Visco
- See Also:
- Serialized Form
-
-
Field Summary
-
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
Constructors Constructor Description ModelGroup()Creates a new ModelGroup, with no nameModelGroup(java.lang.String name, Schema schema)Creates a new ModelGroup with the given nameModelGroup(Schema schema)Creates a new ModelGroup definition
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddModelGroup(ModelGroup modelGroup)Adds the given ModelGroup to this ModelGroupjava.util.Enumerationenumerate()Returns an enumeration of all the Particles of this ContentModelGroupContentModelGroupgetContentModelGroup()Returns the ContentModelGroup for this group Only used for aelement java.util.EnumerationgetDeclarations()Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+java.lang.StringgetName()Returns the name of this ModelGroup.java.lang.StringgetName(boolean ignoreRef)Returns the name of this Model Group definitionModelGroupgetReference()Returns the reference if anyjava.lang.StringgetReferenceId()Returns the Id used to Refer to this ObjectSchemagetSchema()Returns the schema that contains this modelGroup definitionshortgetStructureType()Returns the type of this Schema StructurebooleanhasReference()Returns true if this ModelGroup is referencing another onebooleanisRedefined()Returns true if this group is a redefinition.booleanisReference()Returns true if this model group definition simply references another model group DefinitionvoidsetRedefined()Sets this Group has redefined.voidsetReference(java.lang.String reference)Sets the reference for this ModelGroup definitionvoidsetSchema(Schema schema)Sets the Schema that contains this group.voidvalidate()Checks the validity of this Schema defintion.-
Methods inherited from class org.exolab.castor.xml.schema.Group
addElementDecl, addGroup, addGroup, addWildcard, getElementDecl, getId, getOrder, getParent, getParticle, getParticleCount, hasAny, isEmptiable, isModelGroupDefinition, removeElementDecl, removeGroup, removeGroup, removeWildcard, setId, setIsModelGroupDefinition, setName, setOrder, setParent
-
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 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
-
ModelGroup
public ModelGroup()
Creates a new ModelGroup, with no name
-
ModelGroup
public ModelGroup(Schema schema)
Creates a new ModelGroup definition- Parameters:
schema- the XML Schema to which this ModelGroup belongs
-
ModelGroup
public ModelGroup(java.lang.String name, Schema schema)Creates a new ModelGroup with the given name- Parameters:
name- of the ModelGroup
-
-
Method Detail
-
addModelGroup
public void addModelGroup(ModelGroup modelGroup)
Adds the given ModelGroup to this ModelGroup- Parameters:
modelGroup- the ModelGroup to add to this ModelGroup
-
enumerate
public java.util.Enumeration 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:
ContentModelGroup.enumerate()
-
getDeclarations
public java.util.Enumeration getDeclarations()
Returns an ordered Enumeration of all the ContentModelType definitions (element, group, modelGroupRef)+
-
getContentModelGroup
public ContentModelGroup getContentModelGroup()
Returns the ContentModelGroup for this group Only used for aelement - Overrides:
getContentModelGroupin classGroup- Returns:
- the ContentModelGroup for this group
-
getName
public java.lang.String getName()
Returns the name of this ModelGroup.
-
getName
public java.lang.String getName(boolean ignoreRef)
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
public void setReference(java.lang.String reference)
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:
Structure.getStructureType()
-
getReferenceId
public java.lang.String 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:
Referable
-
getReference
public ModelGroup getReference()
Returns the reference if any- Returns:
- the reference if any
-
hasReference
public boolean hasReference()
Returns true if this ModelGroup is referencing another one- Returns:
- true if this ModelGroup is referencing another one
-
validate
public void validate() throws ValidationExceptionChecks the validity of this Schema defintion.- Overrides:
validatein classGroup- Throws:
ValidationException- when this Schema definition is invalid.
-
getSchema
public Schema getSchema()
Returns the schema that contains this modelGroup definition
-
setSchema
public void setSchema(Schema schema)
Sets the Schema that contains this group.- Parameters:
schema- the Schema that contains this group.
-
-