Package ro.sync.diff.api
Interface AuthorDiffChangeTrackingMerger
@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface AuthorDiffChangeTrackingMerger
Extracts the differences reported when comparing two XML documents ('Two-Way' Author comparison mode)
as a document with change tracking, which can be used to review the differences and merge the two documents.
Access to the resulting document is provided through a
Reader for its content.- Since:
- 26.1
-
Method Summary
Modifier and TypeMethodDescriptiongetMergeResultsReader(URL baseDocSysID, Reader baseDocReader, URL docToMergeWithSysID, Reader docToMergeWithReader, DiffOptions diffOptions) Gets the results of the comparison between two XML documents ('Two-Way' Author comparison mode) as aReaderfor the contents of the resulted document with change tracking, which can be used to review the differences and merge the two documents.
Important note: If the documents to be compared already contain tracked changes, all such changes are automatically accepted before the comparison and the generation of the resulting document.voidsetNameOfAuthorOfChangeTrackingMarkers(String authorName) Sets the name of the author of the change tracking markers created in the merged document.
-
Method Details
-
getMergeResultsReader
Reader getMergeResultsReader(URL baseDocSysID, Reader baseDocReader, URL docToMergeWithSysID, Reader docToMergeWithReader, DiffOptions diffOptions) throws DiffException Gets the results of the comparison between two XML documents ('Two-Way' Author comparison mode) as aReaderfor the contents of the resulted document with change tracking, which can be used to review the differences and merge the two documents.
Important note: If the documents to be compared already contain tracked changes, all such changes are automatically accepted before the comparison and the generation of the resulting document.- Parameters:
baseDocSysID- The system ID of the base document.
Can benull, but only in case of baseDocReader provided.baseDocReader- TheReaderfor the base document.
Ifnulland baseDocSysID provided, the reader will be created internally.
If both baseDocReader and baseDocSysID arenull, aDiffExceptionis thrown.docToMergeWithSysID- The system ID of the document to merge with.
Can benull, but only in case of docToMergeWithReader provided.docToMergeWithReader- TheReaderfor the document to merge with.
Ifnulland docToMergeWithSysID provided, the reader will be created internally.
If both docToMergeWithReader and docToMergeWithSysID arenull, aDiffExceptionis thrown.diffOptions- TheDiffOptionsused to decide which comparing algorithm and which comparing options to use.
Can benullin which case the comparison algorithm is chosen automatically and the default comparison options are used.- Returns:
- A
Readerfor the contents of the resulted document with change tracking which can be used to review the differences and merge the two documents provided for comparison. - Throws:
DiffException- If something went wrong while generating the resulting document.
-
setNameOfAuthorOfChangeTrackingMarkers
Sets the name of the author of the change tracking markers created in the merged document. This name will be post-fixed with the " [Auto Merger]" construct, in order to make a clear association between the author and an imposed/fixed color used for highlighting track changes when loading the merged document in Oxygen.- Parameters:
authorName- The name of the author of the change tracking markers created in the merged document. Can benull, in which case the default name "Auto Merger" is used.
-