public abstract class TextDifferenceListenerBase extends java.lang.Object implements DifferenceListener
Subclasses get a chance to hook into special methods that will be invoked for differences in textual values of attributes, CDATA sections, Text or comment nodes.
RETURN_ACCEPT_DIFFERENCE, RETURN_IGNORE_DIFFERENCE_NODES_IDENTICAL, RETURN_IGNORE_DIFFERENCE_NODES_SIMILAR, RETURN_UPGRADE_DIFFERENCE_NODES_DIFFERENT
Modifier | Constructor and Description |
---|---|
protected |
TextDifferenceListenerBase(DifferenceListener delegateTo) |
Modifier and Type | Method and Description |
---|---|
protected int |
attributeDifference(Difference d)
Delegates to
textualDifference . |
protected int |
cdataDifference(Difference d)
Delegates to
textualDifference . |
protected int |
commentDifference(Difference d)
Delegates to
textualDifference . |
int |
differenceFound(Difference difference)
Delegates to the nested DifferenceListener unless the
Difference is of type
ATTR_VALUE_ID , CDATA_VALUE_ID , COMMENT_VALUE_ID or TEXT_VALUE_ID - for those special differences attributeDifference , cdataDifference , commentDifference or textDifference
are invoked respectively. |
void |
skippedComparison(org.w3c.dom.Node control,
org.w3c.dom.Node test)
Receive notification that a comparison between 2 nodes has been skipped
because the node types are not comparable by the DifferenceEngine
|
protected int |
textDifference(Difference d)
Delegates to
textualDifference . |
protected int |
textualDifference(Difference d)
Delegates to the nested DifferenceListener.
|
protected TextDifferenceListenerBase(DifferenceListener delegateTo)
public int differenceFound(Difference difference)
ATTR_VALUE_ID
, CDATA_VALUE_ID
, COMMENT_VALUE_ID
or TEXT_VALUE_ID
- for those special differences attributeDifference
, cdataDifference
, commentDifference
or textDifference
are invoked respectively.differenceFound
in interface DifferenceListener
difference
- a Difference instance as defined in DifferenceConstants
describing the cause
of the difference and containing the detail of the nodes that
differprotected int attributeDifference(Difference d)
textualDifference
.protected int cdataDifference(Difference d)
textualDifference
.protected int commentDifference(Difference d)
textualDifference
.protected int textDifference(Difference d)
textualDifference
.protected int textualDifference(Difference d)
public void skippedComparison(org.w3c.dom.Node control, org.w3c.dom.Node test)
DifferenceListener
skippedComparison
in interface DifferenceListener
control
- the control node being comparedtest
- the test node being comparedDifferenceEngine