4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.app.LastTextModifications Class Reference

Class representing last applied modifications on a document. More...

Collaboration diagram for cz.vutbr.fit.knot.annotations.app.LastTextModifications:
Collaboration graph

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>>()
 

Detailed Description

Class representing last applied modifications on a document.

Class representing last 3 applied modification sets on a document

Author
xkubik22

Definition at line 25 of file LastTextModifications.java.

Constructor & Destructor Documentation

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

Parameters
documentIDid of the changed document
firstModificationIDfirst modification set ID
firstModificationsfirst modification set

Definition at line 56 of file LastTextModifications.java.

Member Function Documentation

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.

Parameters
modificationIDmodification set ID
modificationsmodification set

Definition at line 69 of file LastTextModifications.java.

synchronized boolean cz.vutbr.fit.knot.annotations.app.LastTextModifications.compareTwoModsForConflicts ( TextModification  firstMod,
TextModification  secondMod 
)
private

Compares two modifications for conflicts firstMod should be applied before secondMod. Checks for compatibility.

Parameters
firstModFirst modification
secondModSecond modification
Returns
true if is there some conflict otherwise false

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.

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized boolean cz.vutbr.fit.knot.annotations.app.LastTextModifications.compareTwoSetsForConflicts ( ArrayList< TextModification firstModSet,
ArrayList< TextModification secondModSet 
)
private

Compares two modification sets for conflicts firstModSet should be applied before secondModSet. Checks for compatibility.

Parameters
firstModSetFirst modification set
secondModSetSecond modification set
Returns
true if is there some conflict otherwise false

Definition at line 123 of file LastTextModifications.java.

Here is the call graph for this function:

Here is the caller graph for this function:

synchronized boolean cz.vutbr.fit.knot.annotations.app.LastTextModifications.containsSet ( int  modificationID)

Checks whetever last modification sets contains passed ID

Parameters
modificationIDmodification set ID

Definition at line 83 of file LastTextModifications.java.

Here is the caller graph for this function:

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.

Parameters
setIDID of the set preceding the checked sets
modificationsChecked modification set
Returns
true if are there conflicts otherwise false

Definition at line 96 of file LastTextModifications.java.

Here is the call graph for this function:

Member Data Documentation

ArrayList<ArrayList<TextModification> > cz.vutbr.fit.knot.annotations.app.LastTextModifications.appliedModifications = new ArrayList<ArrayList<TextModification>>()
private

List of applied modification sets

Definition at line 40 of file LastTextModifications.java.

Integer cz.vutbr.fit.knot.annotations.app.LastTextModifications.documentID = null
private

ID of the affected document

Definition at line 30 of file LastTextModifications.java.

ArrayList<Integer> cz.vutbr.fit.knot.annotations.app.LastTextModifications.modificationsID = new ArrayList<Integer>()
private

List of applied modification set ID's

Definition at line 35 of file LastTextModifications.java.


The documentation for this class was generated from the following file: