com.evolveum.midpoint.common.diff
Class MidPointXpathNodeTracker

java.lang.Object
  extended by org.custommonkey.xmlunit.XpathNodeTracker
      extended by com.evolveum.midpoint.common.diff.MidPointXpathNodeTracker
All Implemented Interfaces:
org.custommonkey.xmlunit.XMLConstants

public class MidPointXpathNodeTracker
extends org.custommonkey.xmlunit.XpathNodeTracker

Overrides XMLUnit XpathNodeTracker implementation. Generates XPath for differences including:

Since:
0.1
Version:
$Revision$ $Date$
Author:
Igor Farinic
See Also:
XpathNodeTracker

Field Summary
 
Fields inherited from interface org.custommonkey.xmlunit.XMLConstants
CLOSE_NODE, END_CDATA, END_COMMENT, END_PROCESSING_INSTRUCTION, OPEN_END_NODE, OPEN_START_NODE, START_CDATA, START_COMMENT, START_DOCTYPE, START_PROCESSING_INSTRUCTION, W3C_XML_SCHEMA_INSTANCE_NO_NAMESPACE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_INSTANCE_NS_URI, W3C_XML_SCHEMA_INSTANCE_SCHEMA_LOCATION_ATTR, W3C_XML_SCHEMA_NS_URI, XML_DECLARATION, XMLNS_PREFIX, XPATH_ATTRIBUTE_IDENTIFIER, XPATH_CHARACTER_NODE_IDENTIFIER, XPATH_COMMENT_IDENTIFIER, XPATH_NODE_INDEX_END, XPATH_NODE_INDEX_START, XPATH_PROCESSING_INSTRUCTION_IDENTIFIER, XPATH_SEPARATOR
 
Constructor Summary
MidPointXpathNodeTracker()
          Simple constructor
 
Method Summary
 void clearTrackedAttribute()
          Call after processing attributes of an element and turining to compare the child nodes.
 void indent()
          Call before examining child nodes one level of indentation into DOM
 void outdent()
          Call after examining child nodes, ie before returning back one level of indentation from DOM
 void preloadChildList(java.util.List nodeList)
          Preload the items in a List by visiting each in turn Required for pieces of test XML whose node children can be visited out of sequence by a DifferenceEngine comparison
 void preloadNodeList(org.w3c.dom.NodeList nodeList)
          Preload the items in a NodeList by visiting each in turn Required for pieces of test XML whose node children can be visited out of sequence by a DifferenceEngine comparison
 void reset()
          Clear state data.
 java.lang.String toXpathString()
           
 void visited(org.w3c.dom.Node node)
          Call when visiting a node whose xpath location needs tracking
protected  void visitedAttribute(java.lang.String visited)
           
protected  void visitedNode(org.w3c.dom.Node visited, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidPointXpathNodeTracker

public MidPointXpathNodeTracker()
Simple constructor

Method Detail

reset

public void reset()
Clear state data. Call if required to reuse an existing instance.

Overrides:
reset in class org.custommonkey.xmlunit.XpathNodeTracker

indent

public void indent()
Call before examining child nodes one level of indentation into DOM

Overrides:
indent in class org.custommonkey.xmlunit.XpathNodeTracker

clearTrackedAttribute

public void clearTrackedAttribute()
Call after processing attributes of an element and turining to compare the child nodes.

Overrides:
clearTrackedAttribute in class org.custommonkey.xmlunit.XpathNodeTracker

outdent

public void outdent()
Call after examining child nodes, ie before returning back one level of indentation from DOM

Overrides:
outdent in class org.custommonkey.xmlunit.XpathNodeTracker

visited

public void visited(org.w3c.dom.Node node)
Call when visiting a node whose xpath location needs tracking

Overrides:
visited in class org.custommonkey.xmlunit.XpathNodeTracker
Parameters:
node - the Node being visited

visitedNode

protected void visitedNode(org.w3c.dom.Node visited,
                           java.lang.String value)
Overrides:
visitedNode in class org.custommonkey.xmlunit.XpathNodeTracker

visitedAttribute

protected void visitedAttribute(java.lang.String visited)
Overrides:
visitedAttribute in class org.custommonkey.xmlunit.XpathNodeTracker

preloadNodeList

public void preloadNodeList(org.w3c.dom.NodeList nodeList)
Preload the items in a NodeList by visiting each in turn Required for pieces of test XML whose node children can be visited out of sequence by a DifferenceEngine comparison

Overrides:
preloadNodeList in class org.custommonkey.xmlunit.XpathNodeTracker
Parameters:
nodeList - the items to preload

preloadChildList

public void preloadChildList(java.util.List nodeList)
Preload the items in a List by visiting each in turn Required for pieces of test XML whose node children can be visited out of sequence by a DifferenceEngine comparison

Overrides:
preloadChildList in class org.custommonkey.xmlunit.XpathNodeTracker
Parameters:
nodeList - the items to preload

toXpathString

public java.lang.String toXpathString()
Overrides:
toXpathString in class org.custommonkey.xmlunit.XpathNodeTracker
Returns:
the last visited node as an xpath-location String


Copyright © 2012 evolveum. All Rights Reserved.