public class Differencer extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
static Integer |
nextId |
Constructor and Description |
---|
Differencer() |
Modifier and Type | Method and Description |
---|---|
void |
diff(Body newer,
Body older,
Result result,
String author,
Calendar date,
RelationshipsPart docPartRelsNewer,
RelationshipsPart docPartRelsOlder) |
void |
diff(P pl,
P pr,
Result result,
String author,
Calendar date,
RelationshipsPart docPartRelsLeft,
RelationshipsPart docPartRelsRight)
Compare 2 p objects, returning a result containing
w:ins and w:del elements
|
void |
diff(P pl,
P pr,
Result result,
String author,
Calendar date,
RelationshipsPart docPartRelsLeft,
RelationshipsPart docPartRelsRight,
boolean preProcess)
Compare 2 p objects, returning a result containing
w:ins and w:del elements
|
void |
diff(SdtContentBlock cbNewer,
SdtContentBlock cbOlder,
Result result,
String author,
Calendar date,
RelationshipsPart docPartRelsNewer,
RelationshipsPart docPartRelsOlder) |
List<Relationship> |
getComposedRels() |
static Integer |
getId()
The id to be allocated to the ins/del
|
static int[] |
getParagraphRunTextWordCounts(P p) |
static String |
getRunString(P p,
int i) |
protected static P |
loadParagraph(String filename) |
static void |
log(String message) |
static void |
main(String[] args) |
void |
markupAsDeletion(SdtContentBlock cbLeft,
Result result,
String author,
Calendar date,
RelationshipsPart docPartRelsRight) |
void |
markupAsInsertion(SdtContentBlock cbLeft,
Result result,
String author,
Calendar date,
RelationshipsPart docPartRelsLeft) |
static void |
registerRelationship(Differencer pd,
RelationshipsPart docPartRels,
String relId,
String newRelId)
Any rel which is present in the results of the comparison must point to
a valid target of the correct type, or the resulting document will
be broken.
|
void |
setRelsDiffIdentifier(String relsDiffIdentifier) |
static void |
setXsltDiffx2Wml(Templates xsltDiffx2Wml)
org/docx4j/diff/diffx2wml.xslt will be used by default
to transform the diff output into a Word docx with tracked
changes.
|
protected static org.slf4j.Logger log
public static Integer nextId
public static void log(String message)
public List<Relationship> getComposedRels()
public static void setXsltDiffx2Wml(Templates xsltDiffx2Wml)
xsltDiffx2Wml
- public static final Integer getId()
public void setRelsDiffIdentifier(String relsDiffIdentifier)
relsDiffIdentifier
- the relsDiffIdentifier to setpublic static void registerRelationship(Differencer pd, RelationshipsPart docPartRels, String relId, String newRelId)
public void diff(P pl, P pr, Result result, String author, Calendar date, RelationshipsPart docPartRelsLeft, RelationshipsPart docPartRelsRight)
pl
- - the left paragraphpr
- - the right paragraphresult
- public void diff(SdtContentBlock cbNewer, SdtContentBlock cbOlder, Result result, String author, Calendar date, RelationshipsPart docPartRelsNewer, RelationshipsPart docPartRelsOlder)
public void diff(Body newer, Body older, Result result, String author, Calendar date, RelationshipsPart docPartRelsNewer, RelationshipsPart docPartRelsOlder)
public void markupAsInsertion(SdtContentBlock cbLeft, Result result, String author, Calendar date, RelationshipsPart docPartRelsLeft)
public void markupAsDeletion(SdtContentBlock cbLeft, Result result, String author, Calendar date, RelationshipsPart docPartRelsRight)
public void diff(P pl, P pr, Result result, String author, Calendar date, RelationshipsPart docPartRelsLeft, RelationshipsPart docPartRelsRight, boolean preProcess)
pl
- - the left paragraphpr
- - the right paragraphresult
- public static int[] getParagraphRunTextWordCounts(P p)
Copyright © 2007-2013. All Rights Reserved.