|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.openoffice.xmerge.merger.merge.DocumentMerge
This is an implementation of the MergeAlgorithm
interface.
This class will merge two Document
classes. It utilizes the
appropriate class which implements NodeMergeAlgorithm
to perform the merge.
Field Summary | |
protected ConverterCapabilities |
cc_
The capabilities of this converter. |
Constructor Summary | |
DocumentMerge(ConverterCapabilities cc,
NodeMergeAlgorithm merge)
Constructor |
Method Summary | |
protected void |
appendNode(org.w3c.dom.Node oldNode,
org.w3c.dom.Node newNode)
Appends Node after the specified Node . |
void |
applyDifference(Iterator orgSeq,
Iterator modSeq,
Difference[] differences)
This method is to merge the difference to an Iterator . |
protected void |
insertNode(org.w3c.dom.Node oldNode,
org.w3c.dom.Node newNode)
Insert Node before the specified Node . |
protected void |
removeNode(org.w3c.dom.Node node)
Removes the specified Node . |
protected void |
replaceElement(org.w3c.dom.Element currElem,
org.w3c.dom.Element newElem)
Replace Element . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ConverterCapabilities cc_
Constructor Detail |
public DocumentMerge(ConverterCapabilities cc, NodeMergeAlgorithm merge)
cc
- The ConverterCapabilities
.merge
- The NodeMergeAlgorithm
.Method Detail |
protected void appendNode(org.w3c.dom.Node oldNode, org.w3c.dom.Node newNode)
Node
after the specified Node
.oldNode
- Node
to append after.newNode
- Node
to append.public void applyDifference(Iterator orgSeq, Iterator modSeq, Difference[] differences) throws MergeException
MergeAlgorithm
Iterator
.
The original Iterator
will be modified after the call.applyDifference
in interface MergeAlgorithm
org.openoffice.xmerge.merger.MergeAlgorithm
objSeq
- The original sequence which the difference
will be applied. It will be modified.modSeq
- The modified sequence where the difference
content will be extracted.differences
- The Difference
array.Iterator
which is the modified original
Iterator
Sequence. Same as the first parameter.MergeException
- If an error occurs during the merge.protected void insertNode(org.w3c.dom.Node oldNode, org.w3c.dom.Node newNode)
Node
before the specified Node
.oldNode
- Node
to insert before.newNode
- Node
to insert.protected void removeNode(org.w3c.dom.Node node)
Node
.node
- Node
to remove.protected void replaceElement(org.w3c.dom.Element currElem, org.w3c.dom.Element newElem)
Element
.currElem
- Element
to be replaced.newElem
- Element
to replace.
|
OpenOffice.org XMerge API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |