4A Server -
2.0
|
Static class which persists suggestion data to the database. More...
Static Public Member Functions | |
static ArrayList< Suggestion > | persist (RequestInfo requestInfo, ArrayList< Annotation > addedAnnotations, ArrayList< Annotation > editedAnnotations, ArrayList< Suggestion > NERsuggestions, boolean solveFeedbacks, ArrayList< AnnotType > addedTypes) |
static void | updateNerSugg (EntityManager em, Suggestion sug, ArrayList< Suggestion > touchedSug, RequestInfo request) |
static Suggestion | saveSuggestionsWithoutLinks (RequestInfo requestInfo, EntityManager em, Annotation annot, HashMap< Integer, Suggestion > reqSuggs, ArrayList< Annotation > nestedInReqAnnotations, ArrayList< Suggestion > touchedSuggestions, HashMap< Annotation, Suggestion > anNewSugLinkMap) |
static void | updateLinksAndNested (Annotation annot, HashMap< Integer, Suggestion > reqSuggs, EntityManager em, ArrayList< Suggestion > touchedSuggestions) |
static void | updateSugg (EntityManager em, Suggestion suggestion, RequestInfo requestInfo, ArrayList< Suggestion > touchedSuggestions, boolean solveFeedback) throws RuntimeException |
static void | setUriOfSuggParams (Suggestion sugg) |
static SuggestionFeedback | getFeedbackByAnnot (Integer annotId, EntityManager em) |
static Suggestion | getSuggestionFromDB (Integer id, EntityManager em) |
Static Private Member Functions | |
static AnnotType | queryType (String uri, EntityManager em) throws RuntimeException |
static void | updateTypes (Suggestion sug, EntityManager em, String logMsg) throws RuntimeException |
static void | updateTypesInNested (Suggestion sug, EntityManager em) |
static Suggestion | saveTmpIdRefSuggestions (Suggestion sug, RequestInfo requestInfo, EntityManager em) throws RuntimeException |
static Suggestion | saveTmpIdRefSuggestions (Suggestion sug, RequestInfo requestInfo, EntityManager em, ArrayList< Suggestion > justSaved, ArrayList< Suggestion > nowSaved) throws RuntimeException |
static void | createNewFeedback (EntityManager em, Annotation annot, Suggestion sugg, UserGroup group) |
static void | changeFeedback (EntityManager em, Annotation annot, int oldSuggID, Suggestion newSugg, UserGroup group) |
static Suggestion | getSuggestionByID (Integer id, EntityManager em) |
static SugBaseAttribute | getSugAttributeByID (Integer id, EntityManager em) |
static Suggestion | getSuggestionByAnnotation (Annotation annot, EntityManager em) |
static void | setNestedZeroConfidence (EntityManager em, Annotation an, ArrayList< Suggestion > touchedSuggestions) |
static void | setNestedSugZeroConfidence (EntityManager em, Suggestion sug, ArrayList< Suggestion > touchedSuggestions) |
Static class which persists suggestion data to the database.
Static class which persists suggestion data to the database
Definition at line 49 of file SugPersister.java.
|
staticprivate |
Changes existing feedback in DB
em | current EntityManager |
annot | Annotation |
oldSuggID | Ols suggestion ID |
newSugg | New suggestion |
group | UserGroup |
Definition at line 1069 of file SugPersister.java.
|
staticprivate |
Creates new feedback in DB
em | current EntityManager |
annot | Annotation |
sugg | Suggestion |
group | UserGroup |
Definition at line 1047 of file SugPersister.java.
|
static |
Method loads suggestion positive feedback specified by annotation.
annotId | annotation id that specify suggestion feedback |
em | Entity manager |
Definition at line 1164 of file SugPersister.java.
|
staticprivate |
Select suggestion attribute from database
id | Id of attribute |
em | Entity manager |
Definition at line 1125 of file SugPersister.java.
|
staticprivate |
Gets suggestion from suggestion feedback table by Annotation
annot | annotation ID |
em | Entity manager |
Definition at line 1146 of file SugPersister.java.
|
staticprivate |
Gets suggestion from DB by ID
id | suggestion ID |
em | current EntityManager |
Definition at line 1104 of file SugPersister.java.
|
static |
Method loads suggestion specified by id from the database.
id | id that specify suggestions |
em | Entity manager |
Definition at line 1181 of file SugPersister.java.
|
static |
Persist informations from request to the database (it persists derived and related informations too)
requestInfo | Informations about client request |
addedAnnotations | Added Annotations |
editedAnnotations | Edited Annotations |
NERsuggestions | suggestionsFromNER |
solveFeedbacks | If I should update suggestion feedback and confidence |
addedTypes | Added types |
Definition at line 63 of file SugPersister.java.
|
staticprivate |
Query database for type of annotation
uri | URI of type of annotation |
em | Entity manager |
RuntimeException | If type of annotation was not found, throws exception |
Definition at line 842 of file SugPersister.java.
|
static |
Function saves Annotation as Suggestion into DB without linked attributes.
requestInfo | information about client request |
em | Entity manager |
annot | Annotation which is converted |
reqSuggs | HasMap with Original Annotation ID as key and new Suggestion as value |
nestedInReqAnnotations | Array with nested annotations |
touchedSuggestions | Array with changed suggestions |
anNewSugLinkMap | Annotation and new link map |
Definition at line 529 of file SugPersister.java.
|
staticprivate |
Recursively saves suggestions in attributes of given suggestion.
sug | Suggestion for reference update |
requestInfo | Informations about client request |
em | current EntityManager |
RuntimeException |
Definition at line 978 of file SugPersister.java.
|
staticprivate |
Recursively saves suggestions in attributes of given suggestion.
sug | Suggestion for reference update |
requestInfo | Informations about client request |
em | current EntityManager |
justSaved | List of just saved suggestions (versions before saving) |
nowSaved | List of just saved suggestions (really saved versions) |
RuntimeException |
Definition at line 992 of file SugPersister.java.
|
staticprivate |
Sets Zero confidence to all nested Suggestions
em | Entity manager |
sug | Refused suggestion |
touchedSuggestions | modified suggestions |
Definition at line 1231 of file SugPersister.java.
|
staticprivate |
Sets Zero confidence to all nested Suggestions
em | Entity manager |
an | Refused annotation |
touchedSuggestions | modified suggestions |
Definition at line 1199 of file SugPersister.java.
|
static |
Sets uri from value in annotation link parameters of given suggestion, also recursively in nested suggestions
sugg | Given suggestion |
Definition at line 810 of file SugPersister.java.
|
static |
Method updates links in saved suggestions
annot | Annotation which is updated |
reqSuggs | HasMap with Original Annotation ID as key and new Suggestion as value |
em | Entity manager |
touchedSuggestions | changed suggestions |
Definition at line 645 of file SugPersister.java.
|
static |
Update suggestion from NER
em | Entity Manager |
sug | Suggestion |
touchedSug | Changed suggestions |
request | information about client request |
Definition at line 466 of file SugPersister.java.
|
static |
Updates suggestion feedback and confidence in DB
em | Entity manager |
suggestion | Updated suggestion |
requestInfo | Information about client request |
touchedSuggestions | Touched suggestions in persister |
solveFeedback | determines if we are solving a feedback |
RuntimeException |
Definition at line 745 of file SugPersister.java.
|
staticprivate |
Method updates types in Suggestion
sug | suggestion for update |
em | current EntityManager |
logMsg | String with error |
RuntimeException |
Definition at line 872 of file SugPersister.java.
|
staticprivate |
Updates types in nested suggestions (use types stored in DB)
sug | Suggestion, which attributes will be updated |
em | Entity manager |
Definition at line 930 of file SugPersister.java.