LibreOffice Module xmerge (master) 1
|
This is an implementation of the MergeAlgorithm
interface.
More...
Public Member Functions | |
DocumentMerge (ConverterCapabilities cc, NodeMergeAlgorithm merge) | |
Constructor. More... | |
void | applyDifference (Iterator orgSeq, Iterator modSeq, Difference[] differences) throws MergeException |
This method is to merge the difference to an Iterator . More... | |
void | applyDifference (Iterator orgSeq, Iterator modSeq, Difference[] differences) throws MergeException |
This method is to merge the difference to an Iterator . More... | |
Protected Member Functions | |
void | removeNode (Node node) |
Removes the specified Node . More... | |
Protected Attributes | |
ConverterCapabilities | cc_ |
The capabilities of this converter. More... | |
Private Member Functions | |
void | appendNode (Node oldNode, Node newNode) |
Appends Node after the specified Node . More... | |
void | insertNode (Node oldNode, Node newNode) |
Insert Node before the specified Node . More... | |
void | replaceElement (Element currElem, Element newElem) |
Replace Element . More... | |
Private Attributes | |
final NodeMergeAlgorithm | subDocumentMerge |
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.
Definition at line 40 of file DocumentMerge.java.
|
inline |
Constructor.
cc | The ConverterCapabilities . |
merge | The NodeMergeAlgorithm . |
Definition at line 53 of file DocumentMerge.java.
References org.openoffice.xmerge.merger.merge.DocumentMerge.cc_, and org.openoffice.xmerge.merger.merge.DocumentMerge.subDocumentMerge.
|
inlineprivate |
Appends Node
after the specified Node
.
oldNode | Node to append after. |
newNode | Node to append. |
Definition at line 188 of file DocumentMerge.java.
References org.openoffice.xmerge.util.XmlUtil.deepClone().
Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().
|
inline |
This method is to merge the difference to an Iterator
.
The original Iterator
will be modified after the call.
orgSeq | 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. |
MergeException | If an error occurs during the merge. |
Implements org.openoffice.xmerge.merger.MergeAlgorithm.
Definition at line 58 of file DocumentMerge.java.
References org.openoffice.xmerge.merger.Difference.ADD, org.openoffice.xmerge.merger.merge.DocumentMerge.appendNode(), org.openoffice.xmerge.merger.Difference.CHANGE, org.openoffice.xmerge.merger.Difference.DELETE, org.openoffice.xmerge.merger.merge.DocumentMerge.insertNode(), org.openoffice.xmerge.merger.NodeMergeAlgorithm.merge(), org.openoffice.xmerge.merger.merge.DocumentMerge.removeNode(), org.openoffice.xmerge.merger.merge.DocumentMerge.replaceElement(), and org.openoffice.xmerge.merger.merge.DocumentMerge.subDocumentMerge.
Referenced by org.openoffice.xmerge.converter.xml.xslt.DocumentMergerImpl.merge().
|
inlineprivate |
Insert Node
before the specified Node
.
oldNode | Node to insert before. |
newNode | Node to insert. |
Definition at line 200 of file DocumentMerge.java.
References org.openoffice.xmerge.util.XmlUtil.deepClone().
Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().
|
inlineprotected |
Removes the specified Node
.
node | Node to remove. |
Reimplemented in org.openoffice.xmerge.merger.merge.SheetMerge.
Definition at line 176 of file DocumentMerge.java.
Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().
|
inlineprivate |
Replace Element
.
currElem | Element to be replaced. |
newElem | Element to replace. |
Definition at line 212 of file DocumentMerge.java.
References org.openoffice.xmerge.util.XmlUtil.deepClone().
Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().
|
protected |
The capabilities of this converter.
Definition at line 45 of file DocumentMerge.java.
Referenced by org.openoffice.xmerge.merger.merge.SheetMerge.clearRow(), and org.openoffice.xmerge.merger.merge.DocumentMerge.DocumentMerge().
|
private |
Definition at line 42 of file DocumentMerge.java.
Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference(), and org.openoffice.xmerge.merger.merge.DocumentMerge.DocumentMerge().