org.jbind.xml.schema.cmp
Class ElemRefOrDecl

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.Component
      extended byorg.jbind.xml.schema.cmp.Content
          extended byorg.jbind.xml.schema.cmp.ElemDesc
              extended byorg.jbind.xml.schema.cmp.ElemRefOrDecl
All Implemented Interfaces:
IComponent, IContentDesc, IDataDesc, IDataRefOrDecl, IDefaultTextContentProvider, IElemDesc, IElemRefOrDecl, IHasBindingAttributes, IHasLocation, IHasRange, ISourceInfo
Direct Known Subclasses:
ElemDecl, ElemRef

public abstract class ElemRefOrDecl
extends ElemDesc
implements IElemRefOrDecl


Field Summary
protected  ISimpleData myDefault
           
protected  java.lang.String myDefaultTextContent
           
protected  ISimpleData myFixed
           
 
Constructor Summary
ElemRefOrDecl(ISourceInfo aSourceInfo, java.lang.String aNamespace, java.lang.String aName, IRange aRange)
           
 
Method Summary
 void add(IElementIdentityConstraint aConstraint)
           
 void checkIdentityConstraints(IAnyTypeData aData, IKeyStore anElementKeys, IConstraintViolations aViolations)
           
 void collectElemDescs(java.util.Map anElementDecls, java.util.List anElemWildcards, IConstraintViolations aViolations)
          Recursively collects the element descriptions that are contained in this content object.
 IUseState createUseState(IUseState aParent)
           
protected  void doAddToParentWithNewRange(IRange aRange, IElemGroupDesc aParent)
           
 ISimpleData getDefault()
          Gets the default value.
 java.lang.String getDefaultTextContent()
           
 ISimpleData getFixed()
          Gets the fixed value.
 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.
 java.util.Iterator iterIdentityConstraints()
           
 void replaceSubstitutions(IElemGroupDesc aParent)
          Recursively adds this content use to the parent group use.
 void validate(IConstraintViolations aViolations)
          Validates the component.
 
Methods inherited from class org.jbind.xml.schema.cmp.ElemDesc
addToParent, checkValueConstraints, createData, createEmptyData, createUncheckedData, createUseStateProxy
 
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.IElemRefOrDecl
getSubstitute, getSubstitutionGroup, iterSubstitutes
 
Methods inherited from interface org.jbind.xml.core.content.IDataRefOrDecl
addValueConstraints
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
accept, addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, isAnonymous, isReference, isTopLevelComponent, setBindings, setParentComponent
 
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.core.content.IDataDesc
checkValueConstraints, createData, createEmptyData, createUncheckedData, getType, isActive, isActive
 
Methods inherited from interface org.jbind.xml.core.content.IElemDesc
isAbstract, isNillable
 
Methods inherited from interface org.jbind.xml.core.content.IContentDesc
addToParent, createUseStateProxy, getDesc, getMaxOccurs, getMinOccurs, isEmptiable, isUnbounded
 
Methods inherited from interface org.jbind.xml.base.IHasRange
getRange
 

Field Detail

myDefault

protected ISimpleData myDefault

myFixed

protected ISimpleData myFixed

myDefaultTextContent

protected java.lang.String myDefaultTextContent
Constructor Detail

ElemRefOrDecl

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

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).

validate

public void validate(IConstraintViolations aViolations)
Description copied from interface: IComponent
Validates the component. This method is called as the last step of the component construction.

Specified by:
validate in interface IComponent
Parameters:
aViolations - (required).

createUseState

public IUseState createUseState(IUseState aParent)
Specified by:
createUseState in interface IContentDesc

getRange

public 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).

getDefault

public ISimpleData getDefault()
Description copied from interface: IDataDesc
Gets the default value. If a fixed value is specified then it is also returned as the default value.

Specified by:
getDefault in interface IDataDesc
Returns:
(optional).

getFixed

public ISimpleData getFixed()
Description copied from interface: IDataDesc
Gets the fixed value. If a fixed value is specified then it is also returned as the default value.

Specified by:
getFixed in interface IDataDesc
Returns:
(optional).

getDefaultTextContent

public java.lang.String getDefaultTextContent()
Specified by:
getDefaultTextContent in interface IDefaultTextContentProvider

add

public void add(IElementIdentityConstraint aConstraint)

iterIdentityConstraints

public java.util.Iterator iterIdentityConstraints()

checkIdentityConstraints

public void checkIdentityConstraints(IAnyTypeData aData,
                                     IKeyStore anElementKeys,
                                     IConstraintViolations aViolations)
Specified by:
checkIdentityConstraints in interface IElemDesc

collectElemDescs

public void collectElemDescs(java.util.Map anElementDecls,
                             java.util.List anElemWildcards,
                             IConstraintViolations aViolations)
Description copied from interface: IContentDesc
Recursively collects the element descriptions that are contained in this content object. Element declarations with the same name and namespace must have the same type as well as the same fixed/default values.

Specified by:
collectElemDescs in interface IContentDesc
Parameters:
anElementDecls - (required). Maps IRefs to IElemRefOrDecl.
anElemWildcards - (required). Collects the element wildcards.
aViolations - (required).

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.

doAddToParentWithNewRange

protected void doAddToParentWithNewRange(IRange aRange,
                                         IElemGroupDesc aParent)
Specified by:
doAddToParentWithNewRange in class ElemDesc