4A Server -
2.0
|
Class which process messages related to suggestions in protocol v 2.0. More...
Classes | |
class | SuggestionFragmentComp |
Class which implements Comparator to sort arrayList of SuggestionFragment alphabetically. More... | |
Public Member Functions | |
void | processSuggestionQuery (Element suggQueryEl, RequestInfo requestInfo) |
void | processSuggestionConfirm (Element suggConfirmEl, RequestInfo requestInfo) |
void | processSuggestionAutoConfirm (Integer minConfidence, RequestInfo requestInfo) |
void | processSuggestionRefuse (Element suggRefuseEl, RequestInfo requestInfo) |
void | processGetAlternatives (Element getAltEl, RequestInfo requestInfo) |
Public Member Functions inherited from cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor | |
Annotation | processAnnotation (Element annotationEl, RequestInfo requestInfo) |
Static Public Member Functions | |
static Suggestion | getSuggestionFromDB (Integer id) |
Private Member Functions | |
ArrayList< SuggestionLogEntry > | updatePositiveFeedback (RequestInfo requestInfo) |
boolean | haveNestedOrLinked (Suggestion sug) |
void | connectAnnotations (ArrayList< Annotation > annotsToConnect, HashMap< String, Annotation > tmpIdMap, RequestInfo requestInfo) |
ArrayList< Fragment > | processSuggFragments (Element fragmentsEl, RequestInfo requestInfo) |
ArrayList< String > | processSuggTypes (Element typesEl, RequestInfo requestInfo) |
ArrayList< Suggestion > | getSuggestionWithoutFeedback (RequestInfo requestInfo, ArrayList< Suggestion > list, ArrayList< Suggestion > modified) |
void | feedbackChangeRef (ArrayList< Suggestion > list, Suggestion sgFromList, ArrayList< Suggestion > modified, SuggestionFeedback fb, ArrayList< Suggestion > removedSuggestions) |
ArrayList< Suggestion > | cutRefusedSuggLinks (ArrayList< Suggestion > userSuggestions, ArrayList< Suggestion > refusedSuggestions) |
Static Private Member Functions | |
static ArrayList< Integer > | findSeparators (String doc) |
Additional Inherited Members | |
Static Protected Member Functions inherited from cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor | |
static String | getUriType (String uri) |
Package Functions inherited from cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2AnnotBaseProcessor | |
boolean | isDocumentUri (String uri) |
Class which process messages related to suggestions in protocol v 2.0.
Class which process XML elements with messages related to suggestions in 4A protocol v 2.0
Definition at line 56 of file P2SuggestionProcessor.java.
|
private |
Method which reconstruct links between annotation objects (references to appropriate objects) using URIs in attributes. For example if there is link to another annotation but only URI of annotation is set in the attribute, it will set also reference to linked annotation. It also reconstruct both sides of nesting relation.
annotsToConnect | List of annotation in which links should be reconstructed. |
tmpIdMap | Map with mapping of URIs to objects |
requestInfo | Informations about client request |
Definition at line 713 of file P2SuggestionProcessor.java.
|
private |
Method sets the rejected references to null and return changed suggestions.
userSuggestions | list of filtered suggestions |
refusedSuggestions | list of refused suggestions by users |
Definition at line 1190 of file P2SuggestionProcessor.java.
|
private |
Adds links in suggestion to modified suggs
list | List of suggestions |
sgFromList | Suggestion to check for links |
modified | List to which modified suggestions will be added |
fb | feedback for this suggestion |
removedSuggestions | Removed suggestions from list. |
Definition at line 1134 of file P2SuggestionProcessor.java.
|
staticprivate |
Finds offsets of all ocurrences of refuse border separator in linearized document (separators are defined in Constants)
doc | Linearized document |
Definition at line 547 of file P2SuggestionProcessor.java.
|
static |
Method loads suggestion specified by id from the database.
id | id that specify suggestions |
Definition at line 508 of file P2SuggestionProcessor.java.
|
private |
Removes suggestions with feedback from the list and replaces all references to them by annotations from feedback (for negative feedback by null).
requestInfo | Informations about client request |
list | List of suggestions |
modified | List to which modified suggestions will be added |
Definition at line 1079 of file P2SuggestionProcessor.java.
|
private |
Checks whether suggestion have some linked or nested attributes
sug | Suggestion to check |
Definition at line 568 of file P2SuggestionProcessor.java.
void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processGetAlternatives | ( | Element | getAltEl, |
RequestInfo | requestInfo | ||
) |
Method for processing of message with request for alternatives
getAltEl | Element with message |
requestInfo | Informations about client request |
Definition at line 877 of file P2SuggestionProcessor.java.
void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionAutoConfirm | ( | Integer | minConfidence, |
RequestInfo | requestInfo | ||
) |
Process request to automatically confirm the suggestions (part of request for suggestions)
Dependencies with lower confidence are also confirmed!
minConfidence | Minimal confidence to automatically confirm suggestion |
requestInfo | Informations about client request |
Definition at line 599 of file P2SuggestionProcessor.java.
void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionConfirm | ( | Element | suggConfirmEl, |
RequestInfo | requestInfo | ||
) |
Method for processing of message with confirmation of suggestions
suggConfirmEl | Element with message |
requestInfo | Informations about client request |
Definition at line 164 of file P2SuggestionProcessor.java.
void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionQuery | ( | Element | suggQueryEl, |
RequestInfo | requestInfo | ||
) |
Method for processing of message with query for suggestions
suggQueryEl | Element with message |
requestInfo | Informations about client request |
Definition at line 64 of file P2SuggestionProcessor.java.
void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionRefuse | ( | Element | suggRefuseEl, |
RequestInfo | requestInfo | ||
) |
Method for processing of message with refusing of suggestions
suggRefuseEl | Element with message |
requestInfo | Informations about client request |
Definition at line 814 of file P2SuggestionProcessor.java.
|
private |
Processes elements with fragments for which annotations should be suggested
fragmentsEl | Elements with fragments |
requestInfo | Informations about client request |
Definition at line 933 of file P2SuggestionProcessor.java.
|
private |
Processes elements with types of annotations which should be suggested
typesEl | Elements with types |
requestInfo | Informations about client request |
Definition at line 1016 of file P2SuggestionProcessor.java.
|
private |
Method for updating positive feedback Automatically cnfirms other similar (same annotated text and URI of entity) suggestions in the same part of document.
requestInfo | Informations about client request |
Definition at line 354 of file P2SuggestionProcessor.java.