Document update Helper.
More...
Document update Helper.
Document update helper class which contains methods necessary to provide modification process
- Author
- Jan Paulovcak (xpaulo00 at stud.fit.vutbr.cz)
Definition at line 38 of file DocumentUpdateHelper.java.
static Node cz.vutbr.fit.knot.annotations.document.DocumentUpdateHelper.getDocumentNode |
( |
Document |
doc, |
|
|
String |
path |
|
) |
| |
|
static |
Search for a node with exact Xpath within a given document
- Parameters
-
doc | Document in which method will search for a node |
path | Xpath of node |
- Returns
- Returns node on success, null otherwise
Definition at line 48 of file DocumentUpdateHelper.java.
static String cz.vutbr.fit.knot.annotations.document.DocumentUpdateHelper.getNodePathForReversed |
( |
String |
xpath, |
|
|
Node |
sourceNode, |
|
|
String |
childNodeName, |
|
|
int |
mode |
|
) |
| |
|
static |
Creates XPath for node that will be used in reversed modifications
It uses name of child node as a stopper while counting number of nodes with the same name
- Parameters
-
xpath | XPath of source node |
sourceNode | Node used in modification |
childNodeName | Node name of child node |
mode | Mode of text modification |
Definition at line 73 of file DocumentUpdateHelper.java.
static String cz.vutbr.fit.knot.annotations.document.DocumentUpdateHelper.nodeAttributesToString |
( |
NamedNodeMap |
map | ) |
|
|
static |
Converts all node's attributes into string form
- Parameters
-
- Returns
- Returns attributes in string form
Definition at line 164 of file DocumentUpdateHelper.java.
static String cz.vutbr.fit.knot.annotations.document.DocumentUpdateHelper.nodeToString |
( |
Node |
root | ) |
|
|
static |
static void cz.vutbr.fit.knot.annotations.document.DocumentUpdateHelper.removeListElements |
( |
ArrayList< TextModification > |
list, |
|
|
int |
start, |
|
|
int |
end |
|
) |
| |
|
static |
Removes unnecessary elements from array list
- Parameters
-
list | Array list of elements |
start | Start position |
end | End position |
Definition at line 206 of file DocumentUpdateHelper.java.
static void cz.vutbr.fit.knot.annotations.document.DocumentUpdateHelper.sortModifications |
( |
ArrayList< TextModification > |
list | ) |
|
|
static |
Sorts list of modifications based upon two criteriums First is to sort XPaths alphabetically, in descending order Second is applied only in case that XPaths are the same, then the modification with higher priority will be first Priority levels of modifications are set within Constants module
- Parameters
-
list | List of modifications |
Definition at line 185 of file DocumentUpdateHelper.java.
The documentation for this class was generated from the following file: