org.jbind.xml.core.cmp
Interface IContentModel

All Known Subinterfaces:
IComplexContentModel, ISimpleContentModel
All Known Implementing Classes:
ComplexContentModel, ContentModel, SimpleContentModel

public interface IContentModel


Method Summary
 boolean canContainText()
          Indicates if the content model allows text.
 IUseStateIterator createUseIterator()
           
 IElemDesc getElemDesc(java.lang.String aNamespace, java.lang.String aName)
          Gets an element description for the specified namespace and name.
 int getMaxOccurs(IRef aRef)
          Gets the maximum number of occurences of the specified element.
 IRange getRange(IRef aRef)
          Gets the range of occurences for the specified element.
 boolean isComplex()
           
 boolean isEmpty()
           
 boolean isMixed()
           
 boolean isSimple()
           
 java.util.Iterator iterElements()
          Iterates the element declarations.
 java.util.Iterator iterElemWildcards()
          Iterates the element wildcards of the content model.
 void validate(IConstraintViolations aViolations)
           
 

Method Detail

validate

public void validate(IConstraintViolations aViolations)

isSimple

public boolean isSimple()

isComplex

public boolean isComplex()

isEmpty

public boolean isEmpty()

isMixed

public boolean isMixed()

iterElements

public java.util.Iterator iterElements()
Iterates the element declarations.

Returns:
An iterator of IElemRefOrDecl.

getElemDesc

public IElemDesc getElemDesc(java.lang.String aNamespace,
                             java.lang.String aName)
                      throws XmlException
Gets an element description for the specified namespace and name. There may be several matching element declarations. Yet, they are guaranteed to have the same type and value constraints.

Parameters:
aNamespace - (required).
aName - (required).
Returns:
(optional).
Throws:
XmlException

getMaxOccurs

public int getMaxOccurs(IRef aRef)
Gets the maximum number of occurences of the specified element.

Returns:
The maximum number of occurences. The constant Integer.MAX_VALUE is returned if the occurence is unbounded.

getRange

public IRange getRange(IRef aRef)
Gets the range of occurences for the specified element.

Returns:
(required).

createUseIterator

public IUseStateIterator createUseIterator()

canContainText

public boolean canContainText()
Indicates if the content model allows text. Simple content models and mixed complex content models return true.

Returns:
Returns true iff the type can contain text.

iterElemWildcards

public java.util.Iterator iterElemWildcards()
Iterates the element wildcards of the content model.

Returns:
(required). An iterator of IElemWildcard