|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.vmguys.vmtools.utils.VMJdomDiff
This class generates and applies difference documents. If given two XML documents, it will generate an difference document that will show the differences between the data. If given an XML document and a difference document, it will apply the differences and return the updated data.
This class operates on JDOM trees, rather than XML documents. An application using this class should parse the input XML files to create the trees, or use the result tree to generate an XML document.
This is similar to OtaUpdate except that the result is not OTA compliant.
| Field Summary | |
static java.lang.String |
schemaLocation
The default schemaLocation value for VMXML documents. |
static java.lang.String |
tagname
The element tag name for a difference document. |
static java.lang.String |
xmlns
The default namespace for VMXML documents. |
| Constructor Summary | |
VMJdomDiff()
No-args constructor. |
|
| Method Summary | |
org.jdom.Element |
applyDiffs(org.jdom.Element original,
org.jdom.Element differences)
Applies the difference tree to the original tree to recreate the modified tree. |
org.jdom.Element |
generateDiffs(org.jdom.Element original,
org.jdom.Element modified)
Returns the differences between the original tree and the modified tree as a VMXMLDiff tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String tagname
public static final java.lang.String xmlns
public static final java.lang.String schemaLocation
| Constructor Detail |
public VMJdomDiff()
| Method Detail |
public org.jdom.Element generateDiffs(org.jdom.Element original,
org.jdom.Element modified)
throws org.jdom.JDOMException
Returns the differences between the original tree and the modified tree as a VMXMLDiff tree. The result tree can then be converted to an XML document.
When the difference tree is applied against the original tree by applyDiffs, the result will be the modified tree.
applyDiffs(Element, Element)
public org.jdom.Element applyDiffs(org.jdom.Element original,
org.jdom.Element differences)
throws org.jdom.JDOMException
generateDiffs(Element, Element)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||