org.apache.xml.dtm.ref
Class DTMDefaultBaseIterators

java.lang.Object
  extended byorg.apache.xml.dtm.ref.DTMDefaultBase
      extended byorg.apache.xml.dtm.ref.DTMDefaultBaseTraversers
          extended byorg.apache.xml.dtm.ref.DTMDefaultBaseIterators
All Implemented Interfaces:
DTM
Direct Known Subclasses:
DOM2DTM, DTMDocument, SAX2DTM

public abstract class DTMDefaultBaseIterators
extends DTMDefaultBaseTraversers

This class implements the traversers for DTMDefaultBase.


Nested Class Summary
private  class DTMDefaultBaseIterators.AncestorIterator
          Iterator that returns the ancestors of a given node in document order.
private  class DTMDefaultBaseIterators.AttributeIterator
          Iterator that returns attribute nodes (of what nodes?)
private  class DTMDefaultBaseIterators.ChildrenIterator
          Iterator that returns all immediate children of a given node
private  class DTMDefaultBaseIterators.DescendantIterator
          Iterator that returns the descendants of a given node.
private  class DTMDefaultBaseIterators.FollowingIterator
          Iterator that returns following nodes of for a given node.
private  class DTMDefaultBaseIterators.FollowingSiblingIterator
          Iterator that returns all siblings of a given node.
private  class DTMDefaultBaseIterators.InternalAxisIteratorBase
          Abstract superclass defining behaviors shared by all DTMDefault's internal implementations of DTMAxisIterator.
private  class DTMDefaultBaseIterators.NamespaceAttributeIterator
          Iterator that returns attributes within a given namespace for a node.
private  class DTMDefaultBaseIterators.NamespaceChildrenIterator
          Iterator that returns children within a given namespace for a given node.
private  class DTMDefaultBaseIterators.NamespaceIterator
          Iterator that returns the namespace nodes as defined by the XPath data model for a given node.
private  class DTMDefaultBaseIterators.NthDescendantIterator
          Iterator that returns the descendants of a given node.
private  class DTMDefaultBaseIterators.ParentIterator
          Iterator that returns the parent of a given node.
private  class DTMDefaultBaseIterators.PrecedingIterator
          Iterator that returns preceding nodes of a given node.
private  class DTMDefaultBaseIterators.PrecedingSiblingIterator
          Iterator that returns preceding siblings of a given node
private  class DTMDefaultBaseIterators.RootIterator
          Iterator that returns the the root node as defined by the XPath data model for a given node.
private  class DTMDefaultBaseIterators.SingletonIterator
          Class SingletonIterator.
private  class DTMDefaultBaseIterators.TypedAncestorIterator
          Typed iterator that returns the ancestors of a given node.
private  class DTMDefaultBaseIterators.TypedAttributeIterator
          Iterator that returns attribute nodes of a given type
private  class DTMDefaultBaseIterators.TypedChildrenIterator
          Iterator that returns children of a given type for a given node.
private  class DTMDefaultBaseIterators.TypedDescendantIterator
          Typed iterator that returns the descendants of a given node.
private  class DTMDefaultBaseIterators.TypedFollowingIterator
          Iterator that returns following nodes of a given type for a given node.
private  class DTMDefaultBaseIterators.TypedFollowingSiblingIterator
          Iterator that returns all following siblings of a given node.
private  class DTMDefaultBaseIterators.TypedNamespaceIterator
          Iterator that returns the namespace nodes as defined by the XPath data model for a given node, filtered by extended type ID.
private  class DTMDefaultBaseIterators.TypedPrecedingIterator
          Iterator that returns preceding nodes of agiven type for a given node.
private  class DTMDefaultBaseIterators.TypedPrecedingSiblingIterator
          Iterator that returns preceding siblings of a given type for a given node
private  class DTMDefaultBaseIterators.TypedRootIterator
          Iterator that returns the namespace nodes as defined by the XPath data model for a given node, filtered by extended type ID.
private  class DTMDefaultBaseIterators.TypedSingletonIterator
          Iterator that returns a given node only if it is of a given type.
 
Nested classes inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers
 
Field Summary
 
Fields inherited from class org.apache.xml.dtm.ref.DTMDefaultBase
JJK_DEBUG, m_blocksize, m_documentBaseURI, m_dtmIdent, m_elemIndexes, m_expandedNameTable, m_exptype, m_firstch, m_indexing, m_initialblocksize, m_mgr, m_mgrDefault, m_namespaceDeclSetElements, m_namespaceDeclSets, m_nextsib, m_parent, m_prevsib, m_shouldStripWhitespaceStack, m_shouldStripWS, m_size, m_traversers, m_wsfilter, m_xstrf, NOTPROCESSED
 
Fields inherited from interface org.apache.xml.dtm.DTM
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NAMESPACE_NODE, NOTATION_NODE, NTYPES, NULL, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
DTMDefaultBaseIterators(DTMManager mgr, javax.xml.transform.Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing)
          Construct a DTMDefaultBaseTraversers object from a DOM node.
 
Method Summary
 DTMAxisIterator getAxisIterator(int axis)
          This is a shortcut to the iterators that implement the XPath axes.
 DTMAxisIterator getTypedAxisIterator(int axis, int type)
          Get an iterator that can navigate over an XPath Axis, predicated by the extended type ID.
 
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBaseTraversers
getAxisTraverser
 
Methods inherited from class org.apache.xml.dtm.ref.DTMDefaultBase
_exptype, _firstch, _level, _nextsib, _parent, _prevsib, _type, appendChild, appendTextChild, declareNamespaceInContext, dispatchCharactersEvents, dispatchToEvents, documentRegistration, documentRelease, dumpDTM, dumpNode, ensureSizeOfIndex, error, findElementFromIndex, findGTE, findInSortedSuballocatedIntVector, findNamespaceContext, getAttributeNode, getDocument, getDocumentAllDeclarationsProcessed, getDocumentBaseURI, getDocumentEncoding, getDocumentRoot, getDocumentStandalone, getDocumentSystemIdentifier, getDocumentTypeDeclarationPublicIdentifier, getDocumentTypeDeclarationSystemIdentifier, getDocumentVersion, getDTMIDs, getElementById, getExpandedTypeID, getExpandedTypeID, getFirstAttribute, getFirstChild, getFirstNamespaceNode, getLastChild, getLevel, getLocalName, getLocalNameFromExpandedNameID, getManager, getNamespaceFromExpandedNameID, getNamespaceType, getNamespaceURI, getNextAttribute, getNextNamespaceNode, getNextNodeIdentity, getNextSibling, getNode, getNodeName, getNodeNameX, getNodeType, getNodeValue, getNumberOfNodes, getOwnerDocument, getParent, getPrefix, getPreviousSibling, getShouldStripWhitespace, getStringValue, getStringValueChunk, getStringValueChunkCount, getUnparsedEntityURI, hasChildNodes, indexNode, isAttributeSpecified, isCharacterElementContentWhitespace, isDocumentAllDeclarationsProcessed, isNodeAfter, isSupported, makeNodeHandle, makeNodeIdentity, nextNode, popShouldStripWhitespace, pushShouldStripWhitespace, setDocumentBaseURI, setFeature, setShouldStripWhitespace, supportsPreStripping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xml.dtm.DTM
getContentHandler, getDeclHandler, getDTDHandler, getEntityResolver, getErrorHandler, getLexicalHandler, getSourceLocatorFor, needsTwoThreads, setProperty
 

Constructor Detail

DTMDefaultBaseIterators

public DTMDefaultBaseIterators(DTMManager mgr,
                               javax.xml.transform.Source source,
                               int dtmIdentity,
                               DTMWSFilter whiteSpaceFilter,
                               XMLStringFactory xstringfactory,
                               boolean doIndexing)
Construct a DTMDefaultBaseTraversers object from a DOM node.

Parameters:
mgr - The DTMManager who owns this DTM.
source - The object that is used to specify the construction source.
dtmIdentity - The DTM identity ID for this DTM.
whiteSpaceFilter - The white space filter for this DTM, which may be null.
xstringfactory - The factory to use for creating XMLStrings.
doIndexing - true if the caller considers it worth it to use indexing schemes.
Method Detail

getTypedAxisIterator

public DTMAxisIterator getTypedAxisIterator(int axis,
                                            int type)
Get an iterator that can navigate over an XPath Axis, predicated by the extended type ID. Returns an iterator that must be initialized with a start node (using iterator.setStartNode()).

Parameters:
axis - One of Axes.ANCESTORORSELF, etc.
type - An extended type ID.
Returns:
A DTMAxisIterator, or null if the given axis isn't supported.

getAxisIterator

public DTMAxisIterator getAxisIterator(int axis)
This is a shortcut to the iterators that implement the XPath axes. Returns a bare-bones iterator that must be initialized with a start node (using iterator.setStartNode()).

Parameters:
axis - One of Axes.ANCESTORORSELF, etc.
Returns:
A DTMAxisIterator, or null if the given axis isn't supported.