|
Oracle® Database XML Java API Reference 12c Release 1 (12.1) E15981-09 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.diff.DiffOp
public abstract class DiffOp
DiffOp. Models a diff operation, that represents a single delta between two inputs at a particular location in the input tree. A diff between two inputs is represented as a list of diff operations.
For example, suppose we have two input XMLs: <a><b1/></a>
and <a/>
. If we run them through the diff(...)
method, the minimal diff will contain a single diff operation: delete-node for the <b1>
element.
Currently supported diff operations are: append-node, insert-before-node, and delete-node.See DiffOp.Name
.
Nested Class Summary | |
---|---|
static class |
DiffOp.Name |
Constructor Summary | |
---|---|
DiffOp() |
Method Summary | |
---|---|
int |
compareTo(DiffOp op) |
abstract Node |
getCurrent() Returns the node to be deleted, for a delete DiffOp . |
abstract java.lang.String |
getCurrentXPath() Returns the XPath to the node to be deleted, for a delete DiffOp . |
abstract Node |
getNew() Returns the node to be inserted or appended, for an insert or append DiffOp . |
abstract DiffOp.Name |
getOpName() Returns the name of the diff operation, one of: append-node, insert-before-node, or delete-node. |
abstract Node |
getParent() Returns the parent node, for an append DiffOp . |
abstract java.lang.String |
getParentXPath() Returns the parent node XPath, for an append DiffOp . |
java.util.HashMap<java.lang.String,java.lang.String> |
getPrefixToNamespace() |
abstract Node |
getSibling() Returns the node to be inserted before, for an insert DiffOp |
abstract java.lang.String |
getSiblingXPath() Returns the XPath to the node to be inserted before, for an insert DiffOp . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiffOp()
Method Detail |
---|
public abstract DiffOp.Name getOpName()
Name
containing the name of the diff operation, one of: Name.INSERT_BY_APPENDING, Name.INSERT_BEFORE_NODE, Name.DELETE
public abstract Node getCurrent() throws java.lang.Exception
DiffOp
.Node
to be deletedException
- if the DiffOp
is not a deletejava.lang.Exception
public abstract Node getNew() throws java.lang.Exception
DiffOp
.Node
to be appended or insertedException
- if the DiffOp
not an insert or appendjava.lang.Exception
public abstract Node getSibling() throws java.lang.Exception
DiffOp
Node
to be inserted beforeException
- if the DiffOp
not an insertjava.lang.Exception
public abstract Node getParent() throws java.lang.Exception
DiffOp
.Node
that the new child will be appended toException
- if the DiffOp
not an appendjava.lang.Exception
public abstract java.lang.String getParentXPath() throws java.lang.Exception
DiffOp
. Whether or not the XPath info is available is controlled by Options
. The includeXPaths(...)
methods of Options
control the current setting of this option, and allow setting it to a new value. Including XPath info adds to the memory use and the computational cost. For maxiumum performance, this option should be turned off.String
representing the XPath to the parent node, null
if it is not availableException
- if the DiffOp
not an appendjava.lang.Exception
public abstract java.lang.String getSiblingXPath() throws java.lang.Exception
DiffOp
. Whether or not the XPath info is available is controlled by Options
. The includeXPaths(...)
methods of Options
control the current setting of this option, and allow setting it to a new value. Including XPath info adds to the memory use and computational cost. For maxiumum performance, this option should be turned off.String
representing the XPath to the node to be inserted before, null
if it is not availableException
- if the DiffOp
not an insertjava.lang.Exception
public abstract java.lang.String getCurrentXPath() throws java.lang.Exception
DiffOp
. Whether or not the XPath info is available is controlled by Options
. The includeXPaths(...)
methods of Options
control the current setting of this option, and allow setting it to a new value. Including XPath info adds to the memory use and computational cost. For maxiumum performance, this option should be turned off.String
representing the XPath to the node to be deleted, null
if it's not availableException
- if the DiffOp
is not a deletejava.lang.Exception
public java.util.HashMap<java.lang.String,java.lang.String> getPrefixToNamespace()
public int compareTo(DiffOp op)
compareTo
in interface java.lang.Comparable<DiffOp>
|
Oracle® Database XML Java API Reference 12c Release 1 (12.1) E15981-09 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2003, 2014, Oracle and/or its affiliates. All rights reserved.