OpenOffice.org
XMerge API

org.openoffice.xmerge.merger.diff
Class ParaNodeIterator

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

public final class ParaNodeIterator
extends NodeIterator

This is an implementation of the Iterator interface. It will traverse the tree and find the Paragraph/Heading 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
ParaNodeIterator(ConverterCapabilities cc, 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

ParaNodeIterator

public ParaNodeIterator(ConverterCapabilities cc,
                        org.w3c.dom.Node node)
Standard constructor.
Parameters:
cc - The ConverterCapabilities.
node - The initial root Node.
Method Detail

nodeSupported

protected boolean nodeSupported(org.w3c.dom.Node node)
Overwrite the parent nodeSupported method.
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