Class: EditOperation

EditOperation(type, oldPathnullable, newPathnullable, newContentnullable)

Data class for a single edit operation. Every edit operation in the CpeeDiff change model is quadruple, although not all values must be present to successfully apply an edit operation.

Constructor

new EditOperation(type, oldPathnullable, newPathnullable, newContentnullable)

Construct a new EditOperation instance.
Parameters:
Name Type Attributes Default Description
type String The type of edit operation.
oldPath String <nullable>
null The path of the node affected by this edit operation *before* it was applied.
newPath String <nullable>
null The path of the node affected by this edit operation *after* it was applied.
newContent Node <nullable>
null The new content added by this edit operation.
Implements:
Source:

Classes

EditOperation

Members

(constant, nullable) newContent :Node

The new content added by this edit operation.
Type:
Source:

(constant, nullable) newPath :String

The path of the node affected by this edit operation *after* it was applied.
Type:
  • String
Source:

(constant, nullable) oldPath :String

The path of the node affected by this edit operation *before* it was applied.
Type:
  • String
Source:

(constant) type :String

The type of edit operation.
Type:
  • String
Source:

Methods

(static) fromXmlDom(xmlElement) → {EditOperation}

Parameters:
Name Type Description
xmlElement Object The XML DOM object.
Source:
Returns:
Type
EditOperation

(static) fromXmlString(xml) → {EditOperation}

Parameters:
Name Type Description
xml String The XML document.
Source:
Returns:
Type
EditOperation

isDeletion() → {Boolean}

Source:
Returns:
Type
Boolean

isInsertion() → {Boolean}

Source:
Returns:
Type
Boolean

isMove() → {Boolean}

Source:
Returns:
Type
Boolean

isUpdate() → {Boolean}

Source:
Returns:
Type
Boolean

toString() → {String}

Source:
Returns:
A string representation of this edit operation.
Type
String

toXmlDom(ownerDocument) → {Object}

Parameters:
Name Type Description
ownerDocument Object The owner document of the generated XML element.
Source:
Returns:
The XML DOM object for this edit operation.
Type
Object

toXmlString() → {String}

Source:
Returns:
The XML document for this edit operation.
Type
String