OpenOffice.org
XMerge API

org.openoffice.xmerge.merger.diff
Class TextNodeIterator

java.lang.Object
  |
  +--org.openoffice.xmerge.merger.diff.NodeIterator
        |
        +--org.openoffice.xmerge.merger.diff.TextNodeIterator
All Implemented Interfaces:
Iterator

public final class TextNodeIterator
extends NodeIterator

This is an implementation of the Iterator interface. It will traverse the tree and find text/space/tab Node sequences.

Note: Once the XML Tree is parsed, then the Iterator will be a snap shot of that tree. That means even the tree is modified later, than the cached paragraph Node list will not be updated accordingly. For this reason and for performance reasons this Iterator does not support any operation methods such as insert, remove or replace. The main purpose of this Iterator is to be used with difference, not with merge.


Constructor Summary
TextNodeIterator(org.w3c.dom.Node node)
          Standard constructor.
 
Method Summary
protected  boolean nodeSupported(org.w3c.dom.Node node)
          Overwrite the parent nodeSupported method.
 
Methods inherited from class org.openoffice.xmerge.merger.diff.NodeIterator
attributesEqual, childrenEqual, compareNode, currentElement, elementCount, end, equivalent, next, previous, refresh, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextNodeIterator

public TextNodeIterator(org.w3c.dom.Node node)
Standard constructor.
Parameters:
initial - The initial root Node.
Method Detail

nodeSupported

protected boolean nodeSupported(org.w3c.dom.Node node)
Overwrite the parent nodeSupported method. Only text Node objects are supported.
Overrides:
nodeSupported in class NodeIterator
Parameters:
node - Node to check.
Returns:
true if the Node is supported, false otherwise.

OpenOffice.org
XMerge API

Copyright © 2002 OpenOffice.org