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

Class which process messages related to suggestions in protocol v 2.0. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor:
Collaboration graph

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< SuggestionLogEntryupdatePositiveFeedback (RequestInfo requestInfo)
 
boolean haveNestedOrLinked (Suggestion sug)
 
void connectAnnotations (ArrayList< Annotation > annotsToConnect, HashMap< String, Annotation > tmpIdMap, RequestInfo requestInfo)
 
ArrayList< FragmentprocessSuggFragments (Element fragmentsEl, RequestInfo requestInfo)
 
ArrayList< String > processSuggTypes (Element typesEl, RequestInfo requestInfo)
 
ArrayList< SuggestiongetSuggestionWithoutFeedback (RequestInfo requestInfo, ArrayList< Suggestion > list, ArrayList< Suggestion > modified)
 
void feedbackChangeRef (ArrayList< Suggestion > list, Suggestion sgFromList, ArrayList< Suggestion > modified, SuggestionFeedback fb, ArrayList< Suggestion > removedSuggestions)
 
ArrayList< SuggestioncutRefusedSuggLinks (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)
 

Detailed Description

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

Author
Martin Petr, Jaroslav Dytrych

Definition at line 56 of file P2SuggestionProcessor.java.

Member Function Documentation

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.connectAnnotations ( ArrayList< Annotation annotsToConnect,
HashMap< String, Annotation tmpIdMap,
RequestInfo  requestInfo 
)
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.

Parameters
annotsToConnectList of annotation in which links should be reconstructed.
tmpIdMapMap with mapping of URIs to objects
requestInfoInformations about client request

Definition at line 713 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

ArrayList<Suggestion> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.cutRefusedSuggLinks ( ArrayList< Suggestion userSuggestions,
ArrayList< Suggestion refusedSuggestions 
)
private

Method sets the rejected references to null and return changed suggestions.

Parameters
userSuggestionslist of filtered suggestions
refusedSuggestionslist of refused suggestions by users
Returns
changed suggestions

Definition at line 1190 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.feedbackChangeRef ( ArrayList< Suggestion list,
Suggestion  sgFromList,
ArrayList< Suggestion modified,
SuggestionFeedback  fb,
ArrayList< Suggestion removedSuggestions 
)
private

Adds links in suggestion to modified suggs

Parameters
listList of suggestions
sgFromListSuggestion to check for links
modifiedList to which modified suggestions will be added
fbfeedback for this suggestion
removedSuggestionsRemoved suggestions from list.

Definition at line 1134 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static ArrayList<Integer> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.findSeparators ( String  doc)
staticprivate

Finds offsets of all ocurrences of refuse border separator in linearized document (separators are defined in Constants)

Parameters
docLinearized document
Returns
Returns offsets of separators

Definition at line 547 of file P2SuggestionProcessor.java.

Here is the caller graph for this function:

static Suggestion cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.getSuggestionFromDB ( Integer  id)
static

Method loads suggestion specified by id from the database.

Parameters
idid that specify suggestions
Returns
querried suggestion or null if suggestion isn't found

Definition at line 508 of file P2SuggestionProcessor.java.

Here is the caller graph for this function:

ArrayList<Suggestion> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.getSuggestionWithoutFeedback ( RequestInfo  requestInfo,
ArrayList< Suggestion list,
ArrayList< Suggestion modified 
)
private

Removes suggestions with feedback from the list and replaces all references to them by annotations from feedback (for negative feedback by null).

Parameters
requestInfoInformations about client request
listList of suggestions
modifiedList to which modified suggestions will be added
Returns
Removed suggestions from list.

Definition at line 1079 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

boolean cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.haveNestedOrLinked ( Suggestion  sug)
private

Checks whether suggestion have some linked or nested attributes

Parameters
sugSuggestion to check
Returns
Returns whether suggestion have some linked or nested attributes

Definition at line 568 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processGetAlternatives ( Element  getAltEl,
RequestInfo  requestInfo 
)

Method for processing of message with request for alternatives

Parameters
getAltElElement with message
requestInfoInformations about client request

Definition at line 877 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

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!

Parameters
minConfidenceMinimal confidence to automatically confirm suggestion
requestInfoInformations about client request

Definition at line 599 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionConfirm ( Element  suggConfirmEl,
RequestInfo  requestInfo 
)

Method for processing of message with confirmation of suggestions

Parameters
suggConfirmElElement with message
requestInfoInformations about client request

Definition at line 164 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionQuery ( Element  suggQueryEl,
RequestInfo  requestInfo 
)

Method for processing of message with query for suggestions

Parameters
suggQueryElElement with message
requestInfoInformations about client request

Definition at line 64 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

void cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggestionRefuse ( Element  suggRefuseEl,
RequestInfo  requestInfo 
)

Method for processing of message with refusing of suggestions

Parameters
suggRefuseElElement with message
requestInfoInformations about client request

Definition at line 814 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

ArrayList<Fragment> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggFragments ( Element  fragmentsEl,
RequestInfo  requestInfo 
)
private

Processes elements with fragments for which annotations should be suggested

Parameters
fragmentsElElements with fragments
requestInfoInformations about client request
Returns
Returns list of processed fragments

Definition at line 933 of file P2SuggestionProcessor.java.

Here is the caller graph for this function:

ArrayList<String> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.processSuggTypes ( Element  typesEl,
RequestInfo  requestInfo 
)
private

Processes elements with types of annotations which should be suggested

Parameters
typesElElements with types
requestInfoInformations about client request
Returns
Returns list of URIs of types

Definition at line 1016 of file P2SuggestionProcessor.java.

Here is the caller graph for this function:

ArrayList<SuggestionLogEntry> cz.vutbr.fit.knot.annotations.comet.protocolV2_0.P2SuggestionProcessor.updatePositiveFeedback ( RequestInfo  requestInfo)
private

Method for updating positive feedback Automatically cnfirms other similar (same annotated text and URI of entity) suggestions in the same part of document.

Parameters
requestInfoInformations about client request
Returns
Automatically onfirmed suggestions

Definition at line 354 of file P2SuggestionProcessor.java.

Here is the call graph for this function:

Here is the caller graph for this function:


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