diff options
Diffstat (limited to 'xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java')
-rw-r--r-- | xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java index a17aae751087..1d37e4cabd5f 100644 --- a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java +++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java @@ -30,11 +30,12 @@ import org.openoffice.xmerge.merger.Difference; import org.openoffice.xmerge.util.XmlUtil; /** - * This is an implementation of the <code>MergeAlgorithm</code> interface. - * This class will merge two <code>Document</code> classes. It utilizes the + * This is an implementation of the {@code MergeAlgorithm} interface. + * + * <p>This class will merge two {@code Document} classes. It utilizes the * appropriate class which implements {@link - * org.openoffice.xmerge.merger.NodeMergeAlgorithm - * NodeMergeAlgorithm} to perform the merge. + * org.openoffice.xmerge.merger.NodeMergeAlgorithm NodeMergeAlgorithm} to + * perform the merge.</p> */ public class DocumentMerge implements MergeAlgorithm { @@ -43,23 +44,20 @@ public class DocumentMerge implements MergeAlgorithm { /** The capabilities of this converter. */ protected ConverterCapabilities cc_; - /** - * Constructor + * Constructor. * - * @param cc The <code>ConverterCapabilities</code>. - * @param merge The <code>NodeMergeAlgorithm</code>. + * @param cc The {@code ConverterCapabilities}. + * @param merge The {@code NodeMergeAlgorithm}. */ public DocumentMerge(ConverterCapabilities cc, NodeMergeAlgorithm merge) { cc_ = cc; subDocumentMerge = merge; } - public void applyDifference(Iterator orgSeq, Iterator modSeq, Difference[] differences) throws MergeException { - // a quick test whether the differences array is in ascending order int currentPosition = -1; boolean haveDeleteOperation = false; @@ -170,11 +168,10 @@ public class DocumentMerge implements MergeAlgorithm { } } - /** - * Removes the specified <code>Node</code>. + * Removes the specified {@code Node}. * - * @param node <code>Node</code> to remove. + * @param node {@code Node} to remove. */ protected void removeNode(Node node) { @@ -183,10 +180,10 @@ public class DocumentMerge implements MergeAlgorithm { } /** - * Appends <code>Node</code> after the specified <code>Node</code>. + * Appends {@code Node} after the specified {@code Node}. * - * @param oldNode <code>Node</code> to append after. - * @param newNode <code>Node</code> to append. + * @param oldNode {@code Node} to append after. + * @param newNode {@code Node} to append. */ private void appendNode(Node oldNode, Node newNode) { Node clonedNode = XmlUtil.deepClone(oldNode, newNode); @@ -194,12 +191,11 @@ public class DocumentMerge implements MergeAlgorithm { parent.appendChild(clonedNode); } - /** - * Insert <code>Node</code> before the specified <code>Node</code>. + * Insert {@code Node} before the specified {@code Node}. * - * @param oldNode <code>Node</code> to insert before. - * @param newNode <code>Node</code> to insert. + * @param oldNode {@code Node} to insert before. + * @param newNode {@code Node} to insert. */ private void insertNode(Node oldNode, Node newNode) { Node clonedNode = XmlUtil.deepClone(oldNode, newNode); @@ -207,12 +203,11 @@ public class DocumentMerge implements MergeAlgorithm { parent.insertBefore(clonedNode, oldNode); } - /** - * Replace <code>Element</code>. + * Replace <code>Element</code>. * - * @param currElem <code>Element</code> to be replaced. - * @param newElem <code>Element</code> to replace. + * @param currElem {@code Element} to be replaced. + * @param newElem {@code Element} to replace. */ private void replaceElement(Element currElem, Element newElem) { @@ -220,5 +215,4 @@ public class DocumentMerge implements MergeAlgorithm { Node parent = currElem.getParentNode(); parent.replaceChild(clonedNode, currElem); } -} - +}
\ No newline at end of file |