org.jbind.xml.core.content
Interface IContentDesc

All Superinterfaces:
IComponent, IHasBindingAttributes, IHasLocation, IHasRange, ISourceInfo
All Known Subinterfaces:
IAllDecl, IAllDesc, IAllRef, IChoiceDecl, IChoiceDesc, IChoiceRef, IElemDecl, IElemDesc, IElemGroupDecl, IElemGroupDesc, IElemGroupRef, IElemRef, IElemRefOrDecl, IElemWildcard, ISequenceDecl, ISequenceDesc, ISequenceRef
All Known Implementing Classes:
AllDecl, ChoiceDecl, Content, ElemDecl, ElemDesc, ElemGroupDesc, ElemRef, ElemRefOrDecl, ElemWildcard, SequenceDecl

public interface IContentDesc
extends IComponent, IHasRange


Method Summary
 boolean addToParent(IElemGroupDesc aParent)
          Recursively adds this content to the parent group.
 void collectElemDescs(java.util.Map anElemRefOrDecls, java.util.List anElemWildcards, IConstraintViolations aViolations)
          Recursively collects the element descriptions that are contained in this content object.
 IUseState createUseState(IUseState aParent)
           
 IUseState createUseStateProxy(IUseState aParent)
           
 java.lang.String getDesc()
          Gets a description that is output if the content was not matched when an instance is read in.
 int getMaxOccurs()
           
 int getMinOccurs()
           
 IRange getRange(IRef anElementRef)
          Gets the range of possible occurences of the specified element in this use (and all of its nested subuses).
 boolean isEmptiable()
          Indicates that the content is emptiable, i.e. that no elements must occur in instance documents to match this content.
 boolean isUnbounded()
           
 void replaceSubstitutions(IElemGroupDesc aParent)
          Recursively adds this content use to the parent group use.
 
Methods inherited from interface org.jbind.xml.core.cmp.IComponent
accept, addSubComponent, getBindings, getGlobalRef, getName, getNamespace, getParentComponent, getSymbolspace, 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
 

Method Detail

getMinOccurs

public int getMinOccurs()

getMaxOccurs

public int getMaxOccurs()

isUnbounded

public boolean isUnbounded()

createUseState

public IUseState createUseState(IUseState aParent)

createUseStateProxy

public IUseState createUseStateProxy(IUseState aParent)

getRange

public IRange getRange(IRef anElementRef)
Gets the range of possible occurences of the specified element in this use (and all of its nested subuses).

Returns:
(required).

isEmptiable

public boolean isEmptiable()
Indicates that the content is emptiable, i.e. that no elements must occur in instance documents to match this content.


getDesc

public java.lang.String getDesc()
Gets a description that is output if the content was not matched when an instance is read in.

Returns:
(required).

collectElemDescs

public void collectElemDescs(java.util.Map anElemRefOrDecls,
                             java.util.List anElemWildcards,
                             IConstraintViolations aViolations)
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.

Parameters:
anElemRefOrDecls - (required). Maps IRefs to IElemRefOrDecl.
anElemWildcards - (required). Collects the element wildcards.
aViolations - (required).

replaceSubstitutions

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

Parameters:
aParent - (required). The group use to which content uses are added.

addToParent

public boolean addToParent(IElemGroupDesc aParent)
Recursively adds this content to the parent group. Pointless groups are removed.

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