org.dsmltools
Class DSMLDOMDiffer

java.lang.Object
  extended by 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.


Constructor Summary
DSMLDOMDiffer()
           
 
Method Summary
 void diff(org.w3c.dom.Document xiDoc1, org.w3c.dom.Document xiDoc2, DocumentImpl xoDocSub, 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
 

Constructor Detail

DSMLDOMDiffer

public DSMLDOMDiffer()
Method Detail

diff

public void diff(org.w3c.dom.Document xiDoc1,
                 org.w3c.dom.Document xiDoc2,
                 DocumentImpl xoDocSub,
                 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 diff
xiDoc2 - Document to be compared to xiDoc1
xoDocSub - 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.