org.jbind.xml.schema.element
Class ModelGroup

java.lang.Object
  extended byorg.jbind.xml.schema.element.Parent
      extended byorg.jbind.xml.schema.element.Element
          extended byorg.jbind.xml.schema.element.OpenAttributes
              extended byorg.jbind.xml.schema.element.Annotated
                  extended byorg.jbind.xml.schema.element.Particle
                      extended byorg.jbind.xml.schema.element.ModelGroup
All Implemented Interfaces:
IAnnotated, IComponentJobHelper, IElement, IHasBindingAttributes, IHasLocation, IJobHelper, IModelGroup, INode, IOpenAttributes, IParent, IParticle, ISchemaDataAdder, ISourceInfo, ITopLevelJobHelper, IXmlElement, IXmlNode
Direct Known Subclasses:
AllModelGroup, ChoiceModelGroup, SequenceModelGroup

public abstract class ModelGroup
extends Particle
implements IModelGroup


Constructor Summary
ModelGroup(CreationParams aCreationParams)
           
 
Method Summary
 void addSchemaData(IComponentStore aStore, IComponent aComponent, IConstraintViolations aViolations)
          Adds data from the schema to the specified component.
 void collectRefsForCompletion(IElementHelper anElementHelper, IJobRefs aJobRefs)
          Recursively collects the references that must be resolved to complete the particle.
 void collectRefsForCreation(IJobRefs aJobRefs)
          Recursively collects all references.
 void collectRefsForValidation(IElementHelper anElementHelper, IJobRefs aJobRefs)
           
 void createAndAddJob(IHasTopLevelJobs aHasTopLevelJobs)
          Creates a job for this helper and adds it to the schema job.
 IComponent createComponent(IElementHelper aHelper, IConstraintViolations aViolations)
           
protected  void doAddSubJobs(IElemGroupDecl aContent, IElementHelper aHelper, IConstraintViolations aViolations)
           
protected  IElement doCreateChild(CreationParams aCreationParams)
          Hook method to create a child element.
 java.util.Iterator iterParticles()
           
 
Methods inherited from class org.jbind.xml.schema.element.Particle
doCreateAttribute, getMaxOccurs, getMinOccurs, getRange, isUnbounded, validateElement
 
Methods inherited from class org.jbind.xml.schema.element.Annotated
getAnnotation, getAnnotationElement, getId, iterAppInfos
 
Methods inherited from class org.jbind.xml.schema.element.OpenAttributes
getAttributeString
 
Methods inherited from class org.jbind.xml.schema.element.Element
acceptAppInfoVisitor, addAttribute, createChild, createGlobalRef, getAttributes, getBindingAttribute, getBoolean, getChildByClass, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalName, getLocalStringBindingAttribute, getLocation, getNamespace, getNamespaceUri, getParent_, getParentHelper, getPrefix, getPrefixToNamespaceMapping, getQName, getSchema, getSchemaDocument, getSchemaElement, getStringBindingAttribute, getSubElement, getTargetNamespace, isTopLevelComponent, iterChildrenByClass, setLocation, setParent_, toString
 
Methods inherited from class org.jbind.xml.schema.element.Parent
addChild, hasChildren, iterChildren, iterXmlNodes, visitChildren
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.schema.element.IModelGroup
createComponent
 
Methods inherited from interface org.jbind.xml.schema.element.IParticle
getMaxOccurs, getMinOccurs, isUnbounded
 
Methods inherited from interface org.jbind.xml.schema.element.IAnnotated
getAnnotationElement, getId
 
Methods inherited from interface org.jbind.xml.schema.element.IOpenAttributes
getAttributeString
 
Methods inherited from interface org.jbind.xml.schema.element.IElement
addAttribute, createChild, getQName, getSchema, getSchemaDocument, getSubElement, isTopLevelComponent, iterChildrenByClass, validateElement
 
Methods inherited from interface org.jbind.xml.schema.element.IParent
addChild, hasChildren, iterChildren
 
Methods inherited from interface org.jbind.xml.schema.element.INode
getParent_, setLocation, setParent_
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.core.cmp.IXmlNode
acceptAppInfoVisitor
 
Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute
 
Methods inherited from interface org.jbind.xml.core.cmp.ISourceInfo
getAnnotation, getPrefixToNamespaceMapping
 
Methods inherited from interface org.jbind.xml.core.cmp.IXmlElement
getAttributes, iterXmlNodes
 
Methods inherited from interface org.jbind.xml.schema.instantiation.IComponentJobHelper
completeComponent, getName, getSymbolSpace, isTopLevelComponent
 

Constructor Detail

ModelGroup

public ModelGroup(CreationParams aCreationParams)
Method Detail

doCreateChild

protected IElement doCreateChild(CreationParams aCreationParams)
                          throws XmlException
Description copied from class: Element
Hook method to create a child element.

Overrides:
doCreateChild in class Annotated
Throws:
XmlException

iterParticles

public java.util.Iterator iterParticles()
Specified by:
iterParticles in interface IModelGroup

collectRefsForCreation

public void collectRefsForCreation(IJobRefs aJobRefs)
Description copied from interface: IParticle
Recursively collects all references.

Specified by:
collectRefsForCreation in interface IParticle
Parameters:
aJobRefs - A collections of IJobRef.

collectRefsForCompletion

public void collectRefsForCompletion(IElementHelper anElementHelper,
                                     IJobRefs aJobRefs)
Description copied from interface: IParticle
Recursively collects the references that must be resolved to complete the particle.

Specified by:
collectRefsForCompletion in interface IParticle
Parameters:
aJobRefs - A collections of IJobRef.
anElementHelper - Description of the Parameter

collectRefsForValidation

public void collectRefsForValidation(IElementHelper anElementHelper,
                                     IJobRefs aJobRefs)
Specified by:
collectRefsForValidation in interface IComponentJobHelper

createComponent

public IComponent createComponent(IElementHelper aHelper,
                                  IConstraintViolations aViolations)
Specified by:
createComponent in interface IComponentJobHelper

doAddSubJobs

protected void doAddSubJobs(IElemGroupDecl aContent,
                            IElementHelper aHelper,
                            IConstraintViolations aViolations)

addSchemaData

public void addSchemaData(IComponentStore aStore,
                          IComponent aComponent,
                          IConstraintViolations aViolations)
Description copied from interface: ISchemaDataAdder
Adds data from the schema to the specified component. Schema data are default and fixed values as well as facets.

Specified by:
addSchemaData in interface ISchemaDataAdder

createAndAddJob

public void createAndAddJob(IHasTopLevelJobs aHasTopLevelJobs)
Description copied from interface: ITopLevelJobHelper
Creates a job for this helper and adds it to the schema job. This method is used by a schema element when it creates the sub jobs of a schema job.

Specified by:
createAndAddJob in interface ITopLevelJobHelper
Returns:
(required).