LibreOffice Module xmerge (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.merger.merge.DocumentMerge Class Reference

This is an implementation of the. More...

Inheritance diagram for org.openoffice.xmerge.merger.merge.DocumentMerge:
[legend]
Collaboration diagram for org.openoffice.xmerge.merger.merge.DocumentMerge:
[legend]

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. More...
 

Protected Member Functions

void removeNode (Node node)
 Removes the specified. More...
 

Protected Attributes

ConverterCapabilities cc_
 The capabilities of this converter. More...
 

Private Member Functions

void appendNode (Node oldNode, Node newNode)
 Appends. More...
 
void insertNode (Node oldNode, Node newNode)
 Insert. More...
 
void replaceElement (Element currElem, Element newElem)
 Replace Element. More...
 

Private Attributes

final NodeMergeAlgorithm subDocumentMerge
 

Detailed Description

This is an implementation of the.

MergeAlgorithm

interface.

This class will merge two

classes. It utilizes the appropriate class which implements NodeMergeAlgorithm to perform the merge.

Definition at line 40 of file DocumentMerge.java.

Constructor & Destructor Documentation

org.openoffice.xmerge.merger.merge.DocumentMerge.DocumentMerge ( ConverterCapabilities  cc,
NodeMergeAlgorithm  merge 
)
inline

Constructor.

Parameters
ccThe
ConverterCapabilities
.
mergeThe
NodeMergeAlgorithm
.

Definition at line 53 of file DocumentMerge.java.

Member Function Documentation

void org.openoffice.xmerge.merger.merge.DocumentMerge.appendNode ( Node  oldNode,
Node  newNode 
)
inlineprivate

Appends.

after the specified

.

Parameters
oldNode

Definition at line 188 of file DocumentMerge.java.

References org.openoffice.xmerge.util.XmlUtil.deepClone().

Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().

void org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference ( Iterator  orgSeq,
Iterator  modSeq,
Difference[]  differences 
) throws MergeException
inline

This method is to merge the difference to an.

Iterator

.

The original

Iterator

will be modified after the call.

Parameters
orgSeqThe original sequence which the difference will be applied. It will be modified.
modSeqThe modified sequence where the difference content will be extracted.
differencesThe
Difference
array.
Exceptions
MergeExceptionIf 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(), and org.openoffice.xmerge.merger.merge.DocumentMerge.replaceElement().

Referenced by org.openoffice.xmerge.converter.xml.xslt.DocumentMergerImpl.merge().

void org.openoffice.xmerge.merger.merge.DocumentMerge.insertNode ( Node  oldNode,
Node  newNode 
)
inlineprivate

Insert.

before the specified

.

Parameters
oldNode

Definition at line 200 of file DocumentMerge.java.

References org.openoffice.xmerge.util.XmlUtil.deepClone().

Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().

void org.openoffice.xmerge.merger.merge.DocumentMerge.removeNode ( Node  node)
inlineprotected

Removes the specified.

.

Parameters
node

Definition at line 176 of file DocumentMerge.java.

Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().

void org.openoffice.xmerge.merger.merge.DocumentMerge.replaceElement ( Element  currElem,
Element  newElem 
)
inlineprivate

Replace Element.

Parameters
currElem

Definition at line 212 of file DocumentMerge.java.

References org.openoffice.xmerge.util.XmlUtil.deepClone().

Referenced by org.openoffice.xmerge.merger.merge.DocumentMerge.applyDifference().

Member Data Documentation

ConverterCapabilities org.openoffice.xmerge.merger.merge.DocumentMerge.cc_
protected

The capabilities of this converter.

Definition at line 45 of file DocumentMerge.java.

Referenced by org.openoffice.xmerge.merger.merge.SheetMerge.clearRow().

final NodeMergeAlgorithm org.openoffice.xmerge.merger.merge.DocumentMerge.subDocumentMerge
private

Definition at line 42 of file DocumentMerge.java.


The documentation for this class was generated from the following file: