4A Server -
2.0
|
Update of document. More...
Classes | |
class | DocumentUpdateException |
Exception of DocumentUpdate class which is thrown in case of modification failure. More... | |
Public Member Functions | |
DocumentUpdate (String documentString) | |
DocumentUpdate (String documentString, EditorSession edSession) | |
void | setDocument (Document doc) |
Document | getDocument () |
void | setDocumentString (String documentString) |
String | getDocumentString () |
void | appendModification (TextModification modification) |
void | appendModifications (ArrayList< TextModification > modifications) |
void | removeModification (TextModification modification) |
void | updateDocument () throws DocumentUpdateException |
void | updateDocument (boolean failed, boolean reverseRun) throws DocumentUpdateException |
Private Member Functions | |
void | updateDocument (boolean failed, boolean reverseRun, ArrayList< TextModification > modifications) throws DocumentUpdateException |
Integer | generateReverseModifications (ArrayList< TextModification > reversedAL, TextModification modification, Node sourceNode) |
Private Attributes | |
Document | doc |
String | documentString |
MatcherProvider | matcherProvider |
ArrayList< TextModification > | modificationsAL = new ArrayList<TextModification>() |
ArrayList< TextModification > | reverseModifications = new ArrayList<TextModification>() |
DocumentUpdateException | docUpdateEx = new DocumentUpdateException() |
EditorSession | edSession |
Update of document.
Class which update document using TextModifications
Definition at line 43 of file DocumentUpdate.java.
cz.vutbr.fit.knot.annotations.document.DocumentUpdate.DocumentUpdate | ( | String | documentString | ) |
Constructor
documentString | Textual content of document |
Definition at line 156 of file DocumentUpdate.java.
cz.vutbr.fit.knot.annotations.document.DocumentUpdate.DocumentUpdate | ( | String | documentString, |
EditorSession | edSession | ||
) |
Constructor
documentString | Textual content of document |
edSession | Editor's (client's) session |
Definition at line 167 of file DocumentUpdate.java.
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.appendModification | ( | TextModification | modification | ) |
Appends new text modification which will be processed next time on update call.
modification | New modification which should be performed to document. |
Definition at line 214 of file DocumentUpdate.java.
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.appendModifications | ( | ArrayList< TextModification > | modifications | ) |
Appends new text modifications which will be processed next time on update call.
modifications | New modifications which should be performed to document. |
Definition at line 223 of file DocumentUpdate.java.
|
private |
Method creates reversed modifications to document, that may be applied onto it in case of modification failure It inserts created modification into array list passed as parameter
reversedAL | List of reversed modifications |
modification | Modification on which will be created reverse modification |
sourceNode | Node used in modification |
Definition at line 793 of file DocumentUpdate.java.
Document cz.vutbr.fit.knot.annotations.document.DocumentUpdate.getDocument | ( | ) |
String cz.vutbr.fit.knot.annotations.document.DocumentUpdate.getDocumentString | ( | ) |
Get document textual content
Definition at line 205 of file DocumentUpdate.java.
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.removeModification | ( | TextModification | modification | ) |
Removes text modification from the modifications to be performed.
modification | Text modification to be removed. |
Definition at line 232 of file DocumentUpdate.java.
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.setDocument | ( | Document | doc | ) |
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.setDocumentString | ( | String | documentString | ) |
Sets textual content of document
documentString | Textual content of document |
Definition at line 196 of file DocumentUpdate.java.
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.updateDocument | ( | ) | throws DocumentUpdateException |
Updates document.
cz.vutbr.fit.knot.annotations.document.DocumentUpdate.UpdateDocumentException |
Definition at line 241 of file DocumentUpdate.java.
void cz.vutbr.fit.knot.annotations.document.DocumentUpdate.updateDocument | ( | boolean | failed, |
boolean | reverseRun | ||
) | throws DocumentUpdateException |
Updates document.
failed | Checks whether modifying has failed |
reverseRun | For reverse run true, false otherwise |
cz.vutbr.fit.knot.annotations.document.DocumentUpdate.UpdateDocumentException |
Definition at line 252 of file DocumentUpdate.java.
|
private |
Updates document.
failed | Checks whether modifying has failed |
reverseRun | For reverse run true, false otherwise |
modifications | List of modifications |
Definition at line 264 of file DocumentUpdate.java.
|
private |
Document to update
Definition at line 137 of file DocumentUpdate.java.
|
private |
Document to update serialized in string
Definition at line 139 of file DocumentUpdate.java.
|
private |
Exception to throw
Definition at line 147 of file DocumentUpdate.java.
|
private |
Client's session
Definition at line 149 of file DocumentUpdate.java.
|
private |
MatcherProvider for additional methods
Definition at line 141 of file DocumentUpdate.java.
|
private |
List of modifications to apply
Definition at line 143 of file DocumentUpdate.java.
|
private |
List of reverse modifications
Definition at line 145 of file DocumentUpdate.java.