org.jbind.xml.schema.cmp
Class SimpleContentModel

java.lang.Object
  extended byorg.jbind.xml.schema.cmp.ContentModel
      extended byorg.jbind.xml.schema.cmp.SimpleContentModel
All Implemented Interfaces:
IContentModel, ISimpleContentModel

public class SimpleContentModel
extends ContentModel
implements ISimpleContentModel


Constructor Summary
SimpleContentModel()
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContentModel

public SimpleContentModel()
Method Detail

isSimple

public boolean isSimple()
Specified by:
isSimple in interface IContentModel

isComplex

public boolean isComplex()
Specified by:
isComplex in interface IContentModel

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface IContentModel

isMixed

public boolean isMixed()
Specified by:
isMixed in interface IContentModel

iterElements

public java.util.Iterator iterElements()
Description copied from interface: IContentModel
Iterates the element declarations.

Specified by:
iterElements in interface IContentModel
Returns:
An iterator of IElemRefOrDecl.

getMaxOccurs

public int getMaxOccurs(IRef aRef)
Description copied from interface: IContentModel
Gets the maximum number of occurences of the specified element.

Specified by:
getMaxOccurs in interface IContentModel
Returns:
The maximum number of occurences. The constant Integer.MAX_VALUE is returned if the occurence is unbounded.

validate

public void validate(IConstraintViolations aViolations)
Specified by:
validate in interface IContentModel

createUseIterator

public IUseStateIterator createUseIterator()
Specified by:
createUseIterator in interface IContentModel

getRange

public IRange getRange(IRef aRef)
Description copied from interface: IContentModel
Gets the range of occurences for the specified element.

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

getElemDesc

public IElemDesc getElemDesc(java.lang.String aNamespace,
                             java.lang.String aName)
Description copied from interface: IContentModel
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.

Specified by:
getElemDesc in interface IContentModel
Parameters:
aNamespace - (required).
aName - (required).
Returns:
(optional).

canContainText

public boolean canContainText()
Description copied from interface: IContentModel
Indicates if the content model allows text. Simple content models and mixed complex content models return true.

Specified by:
canContainText in interface IContentModel
Returns:
Returns true iff the type can contain text.

iterElemWildcards

public java.util.Iterator iterElemWildcards()
Description copied from interface: IContentModel
Iterates the element wildcards of the content model.

Specified by:
iterElemWildcards in interface IContentModel
Returns:
(required). An iterator of IElemWildcard