org.jbind.xml.schema.cmp
Class ElemGroupDesc

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.Content
          extended byorg.jbind.xml.schema.cmp.ElemGroupDesc
All Implemented Interfaces:
IComponent, IContentDesc, IElemGroupDesc, IHasBindingAttributes, IHasLocation, IHasRange, ISourceInfo
Direct Known Subclasses:
ElemGroupDecl, ElemGroupRef

public abstract class ElemGroupDesc
extends Content
implements IElemGroupDesc


Constructor Summary
ElemGroupDesc(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName, IRange aRange)
           
 
Method Summary
 boolean addToParent(IElemGroupDesc aParent)
          Recursively adds this content to the parent group.
 IUseState createUseStateProxy(IUseState aParent)
           
 IRange getRange(IRef aRef)
          Gets the range of possible occurences of the specified element in this use (and all of its nested subuses).
 ISymbolspace getSymbolspace()
          Gets the symbol space.
protected  boolean isPointlessAll(IElemGroupDesc aParent)
           
protected  boolean isPointlessChoice(IElemGroupDesc aParent)
           
protected  boolean isPointlessSequence(IElemGroupDesc aParent)
           
 IContentDesc removePointlessGroups()
           
 void replaceSubstitutions(IElemGroupDesc aParent)
          Recursively adds this content use to the parent group use.
 IElemGroupDesc replaceSubstitutionsByChoice()
           
 
Methods inherited from class org.jbind.xml.schema.cmp.Content
getMaxOccurs, getMinOccurs, getRange, isEmptiable, isUnbounded
 
Methods inherited from class org.jbind.xml.schema.cmp.Component
addSubComponent, getAnnotation, getBindingAttribute, getBindings, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getGlobalRef, getLocalBindingAttribute, getLocalStringBindingAttribute, getLocation, getName, getNamespace, getParentComponent, getPrefixToNamespaceMapping, getStringBindingAttribute, isAnonymous, isTopLevelComponent, setBindings, setParentComponent, visitSubComponents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbind.xml.core.content.IElemGroupDesc
add, createGroup, createGroup, createReference, getCompositor, getInnerRange, getNbParticles, isPointless, iterContent
 
Methods inherited from interface org.jbind.xml.core.content.IContentDesc
collectElemDescs, createUseState, getDesc, getMaxOccurs, getMinOccurs, isEmptiable, isUnbounded
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
accept, addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, isAnonymous, isReference, isTopLevelComponent, setBindings, setParentComponent, validate
 
Methods inherited from interface org.jbind.xml.core.cmp.ISourceInfo
getAnnotation, getPrefixToNamespaceMapping
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.base.IHasBindingAttributes
getBindingAttribute, getDefaultedLocalBindingAttribute, getDefaultedLocalStringBindingAttribute, getLocalBindingAttribute, getLocalStringBindingAttribute, getStringBindingAttribute
 
Methods inherited from interface org.jbind.xml.base.IHasRange
getRange
 

Constructor Detail

ElemGroupDesc

public ElemGroupDesc(ISourceInfo aSourceInfo,
                     java.lang.String aNamespace,
                     java.lang.String aName,
                     IRange aRange)
Method Detail

createUseStateProxy

public final IUseState createUseStateProxy(IUseState aParent)
Specified by:
createUseStateProxy in interface IContentDesc

getRange

public final IRange getRange(IRef aRef)
Description copied from interface: IContentDesc
Gets the range of possible occurences of the specified element in this use (and all of its nested subuses).

Specified by:
getRange in interface IContentDesc
Returns:
(required).

getSymbolspace

public ISymbolspace getSymbolspace()
Description copied from interface: IComponent
Gets the symbol space. A component that is not anonymous has a symbol space.

Specified by:
getSymbolspace in interface IComponent
Returns:
(optional).

isPointlessAll

protected boolean isPointlessAll(IElemGroupDesc aParent)

isPointlessChoice

protected boolean isPointlessChoice(IElemGroupDesc aParent)

isPointlessSequence

protected boolean isPointlessSequence(IElemGroupDesc aParent)

replaceSubstitutionsByChoice

public IElemGroupDesc replaceSubstitutionsByChoice()
Specified by:
replaceSubstitutionsByChoice in interface IElemGroupDesc

replaceSubstitutions

public void replaceSubstitutions(IElemGroupDesc aParent)
Description copied from interface: IContentDesc
Recursively adds this content use to the parent group use. Elements that can be substituted are replaced by corresponding choice groups.

Specified by:
replaceSubstitutions in interface IContentDesc
Parameters:
aParent - (required). The group use to which content uses are added.

removePointlessGroups

public IContentDesc removePointlessGroups()
Specified by:
removePointlessGroups in interface IElemGroupDesc

addToParent

public boolean addToParent(IElemGroupDesc aParent)
Description copied from interface: IContentDesc
Recursively adds this content to the parent group. Pointless groups are removed.

Specified by:
addToParent in interface IContentDesc
Parameters:
aParent - (required). The group use to which this content is added.
Returns:
Returns true iff a pointless group was removed.