public class Patch extends Object
Constructor and Description |
---|
Patch()
Instantiates a new patch.
|
Patch(boolean fullDiff)
Instantiates a new patch.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteNode(de.unirostock.sems.xmlutils.ds.TreeNode toDelete,
int chainId)
Delete a single node.
|
void |
deleteSubtree(de.unirostock.sems.xmlutils.ds.TreeNode toDelete,
int chainId)
Mark a whole subtree as deleted.
|
org.jdom2.Document |
getDocument()
Gets the document containing all changes.
|
int |
getNumAttributeChanges()
Gets the number of attribute changes.
|
int |
getNumDeletes()
Gets the number of stored delete operations.
|
int |
getNumInserts()
Gets the number of stored insert operations.
|
int |
getNumMoves()
Gets the number of stored move operations.
|
int |
getNumNodeChanges()
Gets the number of node changes.
|
int |
getNumTextChanges()
Gets the number of text changes.
|
int |
getNumUpdates()
Gets the number of stored update operations.
|
int |
insertNode(de.unirostock.sems.xmlutils.ds.DocumentNode toInsert,
int chainId)
Insert a single node.
|
void |
insertNode(de.unirostock.sems.xmlutils.ds.TreeNode toInsert,
int chainId)
Insert a single node.
|
void |
insertSubtree(de.unirostock.sems.xmlutils.ds.TreeNode toInsert,
int chainId)
Mark a whole subtree as inserted.
|
void |
updateNode(de.unirostock.sems.xmlutils.comparison.Connection c,
SimpleConnectionManager conMgmt)
Update a node.
|
public Patch()
public Patch(boolean fullDiff)
fullDiff
- the fullDiff flagpublic int getNumMoves()
public int getNumUpdates()
public int getNumDeletes()
public int getNumInserts()
public int getNumNodeChanges()
public int getNumTextChanges()
public int getNumAttributeChanges()
public org.jdom2.Document getDocument()
public void deleteSubtree(de.unirostock.sems.xmlutils.ds.TreeNode toDelete, int chainId)
toDelete
- the node rooting the subtree to deletechainId
- the chain id: id of the trigger, if this modification was triggered, or <1 otherwisepublic void deleteNode(de.unirostock.sems.xmlutils.ds.TreeNode toDelete, int chainId)
toDelete
- the node to deletechainId
- the chain id: id of the trigger, if this modification was triggered, or <1 otherwisepublic void insertSubtree(de.unirostock.sems.xmlutils.ds.TreeNode toInsert, int chainId)
toInsert
- the node rooting the subtree to insertchainId
- the chain id: id of the trigger, if this modification was triggered, or <1 otherwisepublic void insertNode(de.unirostock.sems.xmlutils.ds.TreeNode toInsert, int chainId)
toInsert
- the node to insertchainId
- the chain id: id of the trigger, if this modification was triggered, or <1 otherwisepublic int insertNode(de.unirostock.sems.xmlutils.ds.DocumentNode toInsert, int chainId)
toInsert
- the document node to insertchainId
- the chain id: id of the trigger, if this modification was triggered, or <1 otherwisepublic void updateNode(de.unirostock.sems.xmlutils.comparison.Connection c, SimpleConnectionManager conMgmt)
c
- the connection between the old version of the node and the new version of it.conMgmt
- the connection managerCopyright © 2014 SEMS project @ University of Rostock. All rights reserved.