Class DOMNodeIterator

java.lang.Object
org.apache.batik.dom.traversal.DOMNodeIterator
All Implemented Interfaces:
org.w3c.dom.traversal.NodeIterator

public class DOMNodeIterator extends Object implements org.w3c.dom.traversal.NodeIterator
This class implements the NodeIterator interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final short
    The backward state.
    The document which created the iterator.
    protected boolean
    Whether the children of entity reference nodes are visible to the iterator.
    protected org.w3c.dom.traversal.NodeFilter
    The NodeFilter used to screen nodes.
    protected static final short
    The forward state.
    protected static final short
    The initial state.
    protected static final short
    The invalid state.
    protected Node
    The reference node.
    protected Node
    The root node.
    protected short
    The iterator state.
    protected int
    Which node types are presented via the iterator.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DOMNodeIterator(AbstractDocument doc, Node n, int what, org.w3c.dom.traversal.NodeFilter nf, boolean exp)
    Creates a new NodeIterator object.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    DOM: Implements NodeIterator.detach().
    boolean
    DOM: Implements NodeIterator.getExpandEntityReferences().
    org.w3c.dom.traversal.NodeFilter
    DOM: Implements NodeIterator.getFilter().
    DOM: Implements NodeIterator.getRoot().
    int
    DOM: Implements NodeIterator.getWhatToShow().
    DOM: Implements NodeIterator.nextNode().
    void
    nodeToBeRemoved(Node removedNode)
    Called by the DOM when a node will be removed from the current document.
    DOM: Implements NodeIterator.previousNode().
    protected void
    Sets the reference node to the next node, unfiltered.
    protected void
    Sets the reference node to the previous node, unfiltered.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • INITIAL

      protected static final short INITIAL
      The initial state.
      See Also:
    • INVALID

      protected static final short INVALID
      The invalid state.
      See Also:
    • FORWARD

      protected static final short FORWARD
      The forward state.
      See Also:
    • BACKWARD

      protected static final short BACKWARD
      The backward state.
      See Also:
    • document

      protected AbstractDocument document
      The document which created the iterator.
    • root

      protected Node root
      The root node.
    • whatToShow

      protected int whatToShow
      Which node types are presented via the iterator.
    • filter

      protected org.w3c.dom.traversal.NodeFilter filter
      The NodeFilter used to screen nodes.
    • expandEntityReferences

      protected boolean expandEntityReferences
      Whether the children of entity reference nodes are visible to the iterator.
    • state

      protected short state
      The iterator state.
    • referenceNode

      protected Node referenceNode
      The reference node.
  • Constructor Details

    • DOMNodeIterator

      public DOMNodeIterator(AbstractDocument doc, Node n, int what, org.w3c.dom.traversal.NodeFilter nf, boolean exp)
      Creates a new NodeIterator object.
      Parameters:
      doc - The document which created the tree walker.
      n - The root node.
      what - Which node types are presented via the iterator.
      nf - The NodeFilter used to screen nodes.
      exp - Whether the children of entity reference nodes are visible to the iterator.
  • Method Details

    • getRoot

      public Node getRoot()
      DOM: Implements NodeIterator.getRoot().
      Specified by:
      getRoot in interface org.w3c.dom.traversal.NodeIterator
    • getWhatToShow

      public int getWhatToShow()
      DOM: Implements NodeIterator.getWhatToShow().
      Specified by:
      getWhatToShow in interface org.w3c.dom.traversal.NodeIterator
    • getFilter

      public org.w3c.dom.traversal.NodeFilter getFilter()
      DOM: Implements NodeIterator.getFilter().
      Specified by:
      getFilter in interface org.w3c.dom.traversal.NodeIterator
    • getExpandEntityReferences

      public boolean getExpandEntityReferences()
      DOM: Implements NodeIterator.getExpandEntityReferences().
      Specified by:
      getExpandEntityReferences in interface org.w3c.dom.traversal.NodeIterator
    • nextNode

      public Node nextNode()
      DOM: Implements NodeIterator.nextNode().
      Specified by:
      nextNode in interface org.w3c.dom.traversal.NodeIterator
    • previousNode

      public Node previousNode()
      DOM: Implements NodeIterator.previousNode().
      Specified by:
      previousNode in interface org.w3c.dom.traversal.NodeIterator
    • detach

      public void detach()
      DOM: Implements NodeIterator.detach().
      Specified by:
      detach in interface org.w3c.dom.traversal.NodeIterator
    • nodeToBeRemoved

      public void nodeToBeRemoved(Node removedNode)
      Called by the DOM when a node will be removed from the current document.
    • unfilteredNextNode

      protected void unfilteredNextNode()
      Sets the reference node to the next node, unfiltered.
    • unfilteredPreviousNode

      protected void unfilteredPreviousNode()
      Sets the reference node to the previous node, unfiltered.