Interface LearningRecordService
-
public interface LearningRecordService
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SERVICE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
create(LearningRecord learningRecord)
void
delete(LearningRecord learningRecord)
void
deleteById(long id)
void
deleteRecords(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument document, java.lang.String user)
void
deleteSkippedSuggestions(de.tudarmstadt.ukp.clarin.webanno.security.model.User aUser, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer)
Removes all records of typeLearningRecordType.SKIPPED
in the history of the given layer for the given user.LearningRecord
getRecordById(long recordId)
boolean
hasSkippedSuggestions(de.tudarmstadt.ukp.clarin.webanno.security.model.User aUser, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer)
Checks if the are any records of typeLearningRecordType.SKIPPED
in the history of the given layer for the given user.java.util.List<LearningRecord>
listRecords(java.lang.String user, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer layer)
java.util.List<LearningRecord>
listRecords(java.lang.String user, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer layer, int aLimit)
Fetches the learning records for the given document, user and layer.void
logRecord(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument aDocument, java.lang.String aUsername, AnnotationSuggestion aPrediction, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature aFeature, LearningRecordType aUserAction, LearningRecordChangeLocation aLocation)
void
logRecord(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument aDocument, java.lang.String aUsername, AnnotationSuggestion aSuggestion, java.lang.String aAlternativeLabel, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature aFeature, LearningRecordType aUserAction, LearningRecordChangeLocation aLocation)
Updates the learning log with an entry for the given suggestion.void
update(LearningRecord learningRecord)
-
-
-
Field Detail
-
SERVICE_NAME
static final java.lang.String SERVICE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
listRecords
java.util.List<LearningRecord> listRecords(java.lang.String user, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer layer)
-
listRecords
java.util.List<LearningRecord> listRecords(java.lang.String user, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer layer, int aLimit)
Fetches the learning records for the given document, user and layer. An optional limit can be used, e.g. for loading only a reduced part of the history in the active learning sidebar. Learning records with the actionLearningRecordType.SHOWN
are not returned by this method.
-
deleteRecords
void deleteRecords(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument document, java.lang.String user)
-
getRecordById
LearningRecord getRecordById(long recordId)
-
create
void create(LearningRecord learningRecord)
-
update
void update(LearningRecord learningRecord)
-
delete
void delete(LearningRecord learningRecord)
-
deleteById
void deleteById(long id)
-
logRecord
void logRecord(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument aDocument, java.lang.String aUsername, AnnotationSuggestion aPrediction, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature aFeature, LearningRecordType aUserAction, LearningRecordChangeLocation aLocation)
-
logRecord
void logRecord(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument aDocument, java.lang.String aUsername, AnnotationSuggestion aSuggestion, java.lang.String aAlternativeLabel, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationFeature aFeature, LearningRecordType aUserAction, LearningRecordChangeLocation aLocation)
Updates the learning log with an entry for the given suggestion. Any entries which are duplicates of the new action are removed as part of this action. Note that the actual action the user performed is not taken into account to determine duplicateness.
-
hasSkippedSuggestions
boolean hasSkippedSuggestions(de.tudarmstadt.ukp.clarin.webanno.security.model.User aUser, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer)
Checks if the are any records of typeLearningRecordType.SKIPPED
in the history of the given layer for the given user.
-
deleteSkippedSuggestions
void deleteSkippedSuggestions(de.tudarmstadt.ukp.clarin.webanno.security.model.User aUser, de.tudarmstadt.ukp.clarin.webanno.model.AnnotationLayer aLayer)
Removes all records of typeLearningRecordType.SKIPPED
in the history of the given layer for the given user.
-
-