org.apache.xml.dtm.ref
Class DTMDefaultBaseTraversers

java.lang.Object
  extended by org.apache.xml.dtm.ref.DTMDefaultBase
      extended by org.apache.xml.dtm.ref.DTMDefaultBaseTraversers
All Implemented Interfaces:
DTM
Direct Known Subclasses:
DTMDefaultBaseIterators

public abstract class DTMDefaultBaseTraversers
extends DTMDefaultBase

This class implements the traversers for DTMDefaultBase. PLEASE NOTE that the public interface for all traversers should be in terms of DTM Node Handles... but they may use the internal node identity indices within their logic, for efficiency's sake. Be very careful to avoid confusing these when maintaining this code.


Nested Class Summary
private  class DTMDefaultBaseTraversers.AllFromNodeTraverser
          Implements traversal of the entire subtree, including the root node.
private  class DTMDefaultBaseTraversers.AllFromRootTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.AncestorOrSelfTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.AncestorTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.AttributeTraverser
          Implements traversal of the Attribute access
private  class DTMDefaultBaseTraversers.ChildTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.DescendantFromRootTraverser
          A non-xpath axis, returns all nodes that aren't namespaces or attributes, from but not including the root.
private  class DTMDefaultBaseTraversers.DescendantOrSelfFromRootTraverser
          A non-xpath axis, returns all nodes that aren't namespaces or attributes, from and including the root.
private  class DTMDefaultBaseTraversers.DescendantOrSelfTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.DescendantTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.FollowingSiblingTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.FollowingTraverser
          Implements traversal of the following access, in document order.
private  class DTMDefaultBaseTraversers.IndexedDTMAxisTraverser
          Super class for derived classes that want a convenient way to access the indexing mechanism.
private  class DTMDefaultBaseTraversers.NamespaceDeclsTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.NamespaceTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.ParentTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.PrecedingAndAncestorTraverser
          Implements traversal of the Ancestor and the Preceding axis, in reverse document order.
private  class DTMDefaultBaseTraversers.PrecedingSiblingTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.PrecedingTraverser
          Implements traversal of the Ancestor access, in reverse document order.
private  class DTMDefaultBaseTraversers.RootTraverser
          Implements traversal of the Self axis.
private  class DTMDefaultBaseTraversers.SelfTraverser
          Implements traversal of the Self axis.
 
Field Summary
 
Fields inherited from class org.apache.xml.dtm.ref.DTMDefaultBase
DEFAULT_BLOCKSIZE, DEFAULT_NUMBLOCKS, DEFAULT_NUMBLOCKS_SMALL, JJK_DEBUG, m_documentBaseURI, m_dtmIdent, m_elemIndexes, m_expandedNameTable, m_exptype, m_firstch, m_indexing, 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, ROOTNODE
 
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, ROOT_NODE, TEXT_NODE
 
Constructor Summary
DTMDefaultBaseTraversers(DTMManager mgr, javax.xml.transform.Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing)
          Construct a DTMDefaultBaseTraversers object from a DOM node.
DTMDefaultBaseTraversers(DTMManager mgr, javax.xml.transform.Source source, int dtmIdentity, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory, boolean doIndexing, int blocksize, boolean usePrevsib, boolean newNameTable)
          Construct a DTMDefaultBaseTraversers object from a DOM node.
 
Method Summary
 DTMAxisTraverser getAxisTraverser(int axis)
          This returns a stateless "traverser", that can navigate over an XPath axis, though perhaps not in document order.
 
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, getFirstAttributeIdentity, getFirstChild, getFirstNamespaceNode, getLastChild, getLevel, getLocalName, getLocalNameFromExpandedNameID, getManager, getNamespaceFromExpandedNameID, getNamespaceType, getNamespaceURI, getNextAttribute, getNextAttributeIdentity, getNextNamespaceNode, getNextNodeIdentity, getNextSibling, getNode, getNodeHandle, getNodeIdent, getNodeName, getNodeNameX, getNodeType, getNodeValue, getNumberOfNodes, getOwnerDocument, getParent, getPrefix, getPreviousSibling, getShouldStripWhitespace, getStringValue, getStringValueChunk, getStringValueChunkCount, getTypedAttribute, getTypedFirstChild, getTypedNextSibling, getUnparsedEntityURI, hasChildNodes, indexNode, isAttributeSpecified, isCharacterElementContentWhitespace, isDocumentAllDeclarationsProcessed, isNodeAfter, isSupported, makeNodeHandle, makeNodeIdentity, migrateTo, 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
getAxisIterator, getContentHandler, getDeclHandler, getDTDHandler, getEntityResolver, getErrorHandler, getLexicalHandler, getSourceLocatorFor, getTypedAxisIterator, needsTwoThreads, setProperty
 

Constructor Detail

DTMDefaultBaseTraversers

public DTMDefaultBaseTraversers(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.

DTMDefaultBaseTraversers

public DTMDefaultBaseTraversers(DTMManager mgr,
                                javax.xml.transform.Source source,
                                int dtmIdentity,
                                DTMWSFilter whiteSpaceFilter,
                                XMLStringFactory xstringfactory,
                                boolean doIndexing,
                                int blocksize,
                                boolean usePrevsib,
                                boolean newNameTable)
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.
blocksize - The block size of the DTM.
usePrevsib - true if we want to build the previous sibling node array.
newNameTable - true if we want to use a new ExpandedNameTable for this DTM.
Method Detail

getAxisTraverser

public DTMAxisTraverser getAxisTraverser(int axis)
This returns a stateless "traverser", that can navigate over an XPath axis, though perhaps not in document order.

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