org.jbind.xml.schema.cmp
Class ComplexContentModel

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

public class ComplexContentModel
extends ContentModel
implements IComplexContentModel


Constructor Summary
ComplexContentModel()
           
 
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.
 IElemGroupDesc getGroup()
          Gets the group use.
 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 setGroup(IElemGroupDesc aGroup)
          Sets the group usage.
 void setIsMixed(boolean aBoolean)
           
 void validate(IConstraintViolations aViolations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComplexContentModel

public ComplexContentModel()
Method Detail

setIsMixed

public void setIsMixed(boolean aBoolean)
Specified by:
setIsMixed in interface IComplexContentModel

isMixed

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

getGroup

public IElemGroupDesc getGroup()
Description copied from interface: IComplexContentModel
Gets the group use.

Specified by:
getGroup in interface IComplexContentModel
Returns:
A group usage (optional).

setGroup

public void setGroup(IElemGroupDesc aGroup)
Description copied from interface: IComplexContentModel
Sets the group usage.

Specified by:
setGroup in interface IComplexContentModel

isSimple

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

isEmpty

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

isComplex

public boolean isComplex()
Specified by:
isComplex 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.

validate

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

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.

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)
                      throws XmlException
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).
Throws:
XmlException

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