4A Server -
2.0
|
Class representing last applied modifications on a document. More...
Public Member Functions | |
LastTextModifications () | |
LastTextModifications (int documentID, int firstModificationID, ArrayList< TextModification > firstModifications) | |
synchronized void | addNextModificationSet (int modificationID, ArrayList< TextModification > modifications) |
synchronized boolean | containsSet (int modificationID) |
synchronized boolean | hasModificationSetsConflicts (int setID, ArrayList< TextModification > modifications) |
Private Member Functions | |
synchronized boolean | compareTwoSetsForConflicts (ArrayList< TextModification > firstModSet, ArrayList< TextModification > secondModSet) |
synchronized boolean | compareTwoModsForConflicts (TextModification firstMod, TextModification secondMod) |
Private Attributes | |
Integer | documentID = null |
ArrayList< Integer > | modificationsID = new ArrayList<Integer>() |
ArrayList< ArrayList < TextModification > > | appliedModifications = new ArrayList<ArrayList<TextModification>>() |
Class representing last applied modifications on a document.
Class representing last 3 applied modification sets on a document
Definition at line 25 of file LastTextModifications.java.
cz.vutbr.fit.knot.annotations.app.LastTextModifications.LastTextModifications | ( | ) |
Empty constructor
Definition at line 45 of file LastTextModifications.java.
cz.vutbr.fit.knot.annotations.app.LastTextModifications.LastTextModifications | ( | int | documentID, |
int | firstModificationID, | ||
ArrayList< TextModification > | firstModifications | ||
) |
Constructor for first applied modifications
documentID | id of the changed document |
firstModificationID | first modification set ID |
firstModifications | first modification set |
Definition at line 56 of file LastTextModifications.java.
synchronized void cz.vutbr.fit.knot.annotations.app.LastTextModifications.addNextModificationSet | ( | int | modificationID, |
ArrayList< TextModification > | modifications | ||
) |
Adds next applied modification If are there already three modifications then it deletes the oldest one.
modificationID | modification set ID |
modifications | modification set |
Definition at line 69 of file LastTextModifications.java.
|
private |
Compares two modifications for conflicts firstMod should be applied before secondMod. Checks for compatibility.
firstMod | First modification |
secondMod | Second modification |
Replace options: Replacement of whole node (0 - n xpath change) Delete whole node (1 xpath change) Insertion to node (only change of the content of the node) Replacement of part of node (only change of the content of the node)
Definition at line 149 of file LastTextModifications.java.
|
private |
Compares two modification sets for conflicts firstModSet should be applied before secondModSet. Checks for compatibility.
firstModSet | First modification set |
secondModSet | Second modification set |
Definition at line 123 of file LastTextModifications.java.
synchronized boolean cz.vutbr.fit.knot.annotations.app.LastTextModifications.containsSet | ( | int | modificationID | ) |
Checks whetever last modification sets contains passed ID
modificationID | modification set ID |
Definition at line 83 of file LastTextModifications.java.
synchronized boolean cz.vutbr.fit.knot.annotations.app.LastTextModifications.hasModificationSetsConflicts | ( | int | setID, |
ArrayList< TextModification > | modifications | ||
) |
Checks whetever the modification sets applied after modification identified by the passed setID contains conflicts with passed modification set.
setID | ID of the set preceding the checked sets |
modifications | Checked modification set |
Definition at line 96 of file LastTextModifications.java.
|
private |
List of applied modification sets
Definition at line 40 of file LastTextModifications.java.
|
private |
ID of the affected document
Definition at line 30 of file LastTextModifications.java.
|
private |
List of applied modification set ID's
Definition at line 35 of file LastTextModifications.java.