org.dsmltools
Class DSMLDOMDiffer
java.lang.Object
|
+--org.dsmltools.DSMLDOMDiffer
- public class DSMLDOMDiffer
- extends java.lang.Object
This class implements asymmetric diffing of two DSML Documents, with the
results returned as two more DSML Documents.
Method Summary |
void |
diff(org.w3c.dom.Document xiDoc1,
org.w3c.dom.Document xiDoc2,
org.apache.xerces.dom.DocumentImpl xoDocSub,
org.apache.xerces.dom.DocumentImpl xoDocAdd)
This method creates, in Document form, the diffs necessary to turn
xiDoc1 into xiDoc2. |
void |
setAddComments(boolean xiAddComments)
This method sets whether human-readable comments are added to the Add
file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DSMLDOMDiffer
public DSMLDOMDiffer()
diff
public void diff(org.w3c.dom.Document xiDoc1,
org.w3c.dom.Document xiDoc2,
org.apache.xerces.dom.DocumentImpl xoDocSub,
org.apache.xerces.dom.DocumentImpl xoDocAdd)
- This method creates, in Document form, the diffs necessary to turn
xiDoc1 into xiDoc2. These diffs will be returned using the variables
xoDocSub, and xoDocAdd, which are expected to be passed in as
bare-bones DSML Documents.
Warning: xiDoc1 and xiDoc2 get munged by this process. Don't
pass Documents in you want to keep.
- Parameters:
xiDoc1
- Base document for the diffxiDoc2
- Document to be compared to xiDoc1xoDocSub
- Newly created DSMLDocumentImpl to hold entries to be
subtracted.xoDocAdd
- Newly created DSMLDocumentImpl to hold entries to be
added.
setAddComments
public void setAddComments(boolean xiAddComments)
- This method sets whether human-readable comments are added to the Add
file.
- Parameters:
xiAddComments
- True to add comments, false to not add comments.