Class: EditScript

EditScript()

A wrapper class for an ordered sequence of edit operations, commonly referred to as an edit script. An edit script captures the changes that transform one version of a process tree into another.

Constructor

new EditScript()

Construct a new EditScript instance.
Implements:
Source:

Classes

EditScript

Members

cost

Source:

editOperations

Source:

Methods

(static) fromXmlDom(xmlElement) → {EditScript}

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

(static) fromXmlString(xml) → {EditScript}

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

appendDeletion(deletedNode)

Append a DELETE operation to this edit script.
Parameters:
Name Type Description
deletedNode Node The root of the deleted subtree.
Source:

appendInsertion(insertedNode)

Append a INSERT operation to this edit script.
Parameters:
Name Type Description
insertedNode Node The root of the inserted subtree *after* it has been inserted.
Source:

appendMove(oldPath, newPath)

Append a MOVE operation to this edit script.
Parameters:
Name Type Description
oldPath String The path of the moved node *before* it was moved.
newPath String The path of the moved node *after* it was moved.
Source:

appendUpdate(updatedNode)

Append an UPDATE operation to this edit script.
Parameters:
Name Type Description
updatedNode Node The updated node *after* the update was applied.
Source:

deletions() → {Number}

Source:
Returns:
The number of deletions in this edit script.
Type
Number

insertions() → {Number}

Source:
Returns:
The number of insertions in this edit script.
Type
Number

isValid(oldTree, newTree) → {Boolean}

Check if this edit script is valid for a process tree transformation.
Parameters:
Name Type Description
oldTree Node The root of the old (original) process tree.
newTree Node The root of the new (changed) process tree.
Source:
Returns:
True, iff this edit script is valid.
Type
Boolean

moves() → {Number}

Source:
Returns:
The number of moves in this edit script.
Type
Number

size() → {Number}

Source:
Returns:
Type
Number

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 script.
Type
Object

toXmlString() → {String}

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

updates() → {Number}

Source:
Returns:
The number of updates in this edit script.
Type
Number