Interface LearningRecordService


  • public interface LearningRecordService
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String SERVICE_NAME  
    • 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 action LearningRecordType.SHOWN are not returned by this method.
      • deleteRecords

        void deleteRecords​(de.tudarmstadt.ukp.clarin.webanno.model.SourceDocument document,
                           java.lang.String user)
      • 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 type LearningRecordType.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 type LearningRecordType.SKIPPED in the history of the given layer for the given user.