4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager Class Reference

Class for manipulation with alternatives of suggestions. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager:
Collaboration graph

Public Member Functions

 AlternativeManager (RequestInfo request, String document, String documentUri, ArrayList< Suggestion > validSuggestions, SuggestionManager sugManager, Integer docID)
 
void run ()
 

Static Public Member Functions

static void activateAlternatives (RequestInfo request, Suggestion sug)
 
static void confirmSuggestions (RequestInfo request, ArrayList< Suggestion > confirmSuggs)
 
static boolean overlappingFragment (ArrayList< SuggestionFragment > sugFragments, int newFragStart, int newFragEnd)
 
static List< SuggestiongetOtherSuggestions (int alternativeOfId)
 

Package Attributes

RequestInfo requestInfo = null
 
String document
 
String documentUri
 
ArrayList< AnnotTypenewTypes
 
ArrayList< SuggestionvalidSuggestions
 
SuggestionManager sugManager
 
Integer docID
 

Private Member Functions

void processAlternative ()
 
void persistAlternatives (ArrayList< Alternative > alternatives)
 
void deleteAlternativesForDocument ()
 

Static Private Member Functions

static void refuseSuggestions (RequestInfo request, ArrayList< Suggestion > suggestionsToRefuse)
 
static ArrayList< SuggestionalternativesToSuggestions (ArrayList< Alternative > alternatives)
 
static void setAsUsed (List< Alternative > alternatives)
 
static void deleteAlternatives (List< Alternative > alternativeToPersist)
 
static void clearIsFromSECAPI (ArrayList< Suggestion > confirmSuggs)
 
static List< AlternativegetAlternatives (int alternativeOfId)
 
static List< SuggestiongetOtherSuggestions (int alternativeOfId, int notThisSugId)
 

Detailed Description

Class for manipulation with alternatives of suggestions.

Class for manipulation with alternatives of suggestions

Author
Marek Kopecky

Definition at line 49 of file AlternativeManager.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.AlternativeManager ( RequestInfo  request,
String  document,
String  documentUri,
ArrayList< Suggestion validSuggestions,
SuggestionManager  sugManager,
Integer  docID 
)

Constructor

Parameters
requestInformations about request from client
documentLinearized document
documentUriURI of original document
validSuggestionsNew saved suggestions
sugManagerSuggestion manager which created this
docIDID of synchronized document

Definition at line 82 of file AlternativeManager.java.

Member Function Documentation

static void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.activateAlternatives ( RequestInfo  request,
Suggestion  sug 
)
static

Top level function to select alternatives for refused suggestion and activate it. This function is called, when user refuse some suggestion.

Parameters
requestInformations about client request
sugRefused suggestion.

Definition at line 234 of file AlternativeManager.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static ArrayList<Suggestion> cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.alternativesToSuggestions ( ArrayList< Alternative alternatives)
staticprivate

Transform all selected alternatives to suggestion

Parameters
alternativesList of alternatives
Returns
List of suggestions

Definition at line 505 of file AlternativeManager.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.clearIsFromSECAPI ( ArrayList< Suggestion confirmSuggs)
staticprivate

Set isFromSECAPI flag of suggestion to false.

Parameters
confirmSuggsList of suggestions.

Definition at line 618 of file AlternativeManager.java.

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.confirmSuggestions ( RequestInfo  request,
ArrayList< Suggestion confirmSuggs 
)
static

Top level function to remove alternatives of confirmSuggs and refuse suggestions, that were alternatives of confirmSuggs.

Parameters
requestInformations about client request
confirmSuggsList of suggestions

Definition at line 373 of file AlternativeManager.java.

Here is the call graph for this function:

static void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.deleteAlternatives ( List< Alternative alternativeToPersist)
staticprivate

Delete alternatives from DB

Parameters
alternativeToPersistAlternatives which should be deleted

Definition at line 579 of file AlternativeManager.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.deleteAlternativesForDocument ( )
private

Delete all alternatives for actual document.

Definition at line 519 of file AlternativeManager.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static List<Alternative> cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.getAlternatives ( int  alternativeOfId)
staticprivate

Method loads alternative specified by alternativeOf from the database.

Parameters
alternativeOfIdAlternativeOf id.
Returns
list of querried alternatives

Definition at line 658 of file AlternativeManager.java.

Here is the caller graph for this function:

static List<Suggestion> cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.getOtherSuggestions ( int  alternativeOfId)
static

Method loads alternative specified by alternativeOf from the database.

Parameters
alternativeOfIdAlternativeOf id.
Returns
list of querried alternatives

Definition at line 675 of file AlternativeManager.java.

Here is the caller graph for this function:

static List<Suggestion> cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.getOtherSuggestions ( int  alternativeOfId,
int  notThisSugId 
)
staticprivate

Method loads alternative specified by alternativeOf from the database.

Parameters
alternativeOfIdAlternativeOf id.
notThisSugIdAll alternatives except alternative suggestion with this id
Returns
list of querried alternatives

Definition at line 693 of file AlternativeManager.java.

static boolean cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.overlappingFragment ( ArrayList< SuggestionFragment sugFragments,
int  newFragStart,
int  newFragEnd 
)
static

Determine, if on fragment overlap some fragments from suggestion

Parameters
sugFragmentsSuggestion fragments
newFragStartStart offset of reference fragment
newFragEndEnd offset of reference fragment
Returns
Determine, if on fragment overlap some fragments from suggestion

Definition at line 474 of file AlternativeManager.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.persistAlternatives ( ArrayList< Alternative alternatives)
private

Persist function for alternatives

Parameters
alternativesAlternatives to persist

Definition at line 430 of file AlternativeManager.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.processAlternative ( )
private

Get and process alternatives.

Definition at line 123 of file AlternativeManager.java.

Here is the call graph for this function:

Here is the caller graph for this function:

static void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.refuseSuggestions ( RequestInfo  request,
ArrayList< Suggestion suggestionsToRefuse 
)
staticprivate

Refuse suggestionsToRefuse list.

Parameters
requestInformations about client request
suggestionsToRefuseList of suggestions

Definition at line 411 of file AlternativeManager.java.

Here is the call graph for this function:

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.run ( )

Method start the thread code execution.

Consider adding locks.

Definition at line 100 of file AlternativeManager.java.

Here is the call graph for this function:

static void cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.setAsUsed ( List< Alternative alternatives)
staticprivate

Sets alternatives as used

Parameters
alternativesAlternatives which should be set as used

Definition at line 538 of file AlternativeManager.java.

Here is the caller graph for this function:

Member Data Documentation

Integer cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.docID
package

ID of synchronized document

Definition at line 70 of file AlternativeManager.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.document
package

Linearized document

Definition at line 55 of file AlternativeManager.java.

String cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.documentUri
package

URI of original document

Definition at line 58 of file AlternativeManager.java.

ArrayList<AnnotType> cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.newTypes
package

Array for adding new types of alternatives

Definition at line 61 of file AlternativeManager.java.

RequestInfo cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.requestInfo = null
package

Informations about request from client

Definition at line 52 of file AlternativeManager.java.

SuggestionManager cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.sugManager
package

Suggestion manager

Definition at line 67 of file AlternativeManager.java.

ArrayList<Suggestion> cz.vutbr.fit.knot.annotations.modules.suggestionManager.alternative.AlternativeManager.validSuggestions
package

New saved suggestions

Definition at line 64 of file AlternativeManager.java.


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