org.jbind.xml.core.cmp
Interface IUseStateIterator

All Known Implementing Classes:
EmptyUseStateIterator, UseStateIterator

public interface IUseStateIterator

Iterates through a content model by always returning the element description for the next element.


Method Summary
 IElemDesc getNextElemDesc(java.lang.String aNamespace, java.lang.String aName, IAnyType anOverloadingType, IHasLocation aHasLocation)
          Gets a description for the next element.
 IElemRefOrDecl getSubstitutionHead()
          Gets the substitution head for the last element description returned.
 void isValidEnd(IHasLocation aHasLocation)
          Checks if the use iterator is in a valid end state.
 

Method Detail

getNextElemDesc

public IElemDesc getNextElemDesc(java.lang.String aNamespace,
                                 java.lang.String aName,
                                 IAnyType anOverloadingType,
                                 IHasLocation aHasLocation)
                          throws XmlException
Gets a description for the next element. If no description is returned then the element and all its nested elements are skipped, i.e. no data objects are created for them.

Parameters:
aNamespace - (required). The namespace of the element.
aName - (required). The name of the element.
anOverloadingType - (optional). Used by wildcard element if the element declaration can not be found.
aHasLocation - (optional).
Returns:
(optional).
Throws:
XmlException - Raised iff no element description could be found but the element must not be skipped.

isValidEnd

public void isValidEnd(IHasLocation aHasLocation)
                throws XmlException
Checks if the use iterator is in a valid end state.

Parameters:
aHasLocation - (optional).
Throws:
XmlException - Raised iff the use iterator is not in a valid end state.

getSubstitutionHead

public IElemRefOrDecl getSubstitutionHead()
Gets the substitution head for the last element description returned. If the last element description returned was a substitute for another element description then the substituted element description is returned.

Returns:
(optional).