java.lang.Object
edu.kit.datamanager.takita.mainpage.dashboard.annoview.AnnoViewService
All Implemented Interfaces:
IAnnoViewService

@SessionScope @Service public class AnnoViewService extends Object implements IAnnoViewService
Implementation of ContentView Service for type AnnoView. Has specific methods for AnnoView Content, such as get Thumbnails, add Attribute, delete Attribute. Has a name/type of ContentView it is implementing and holds the Attributes that are currently selected to be displayed.
  • Constructor Details

    • AnnoViewService

      @Autowired public AnnoViewService(ISearchService searchService)
      Constructor for the Anno View Service to autowire required instances.
      Parameters:
      searchService - instance of the logic for search. Injected with Springs dependency injection system indicated by @autowired annotation.
  • Method Details

    • search

      public List<Annotation> search()
      Trigger search.
      Returns:
      List of Manuscripts
    • getResults

      public List<Annotation> getResults()
      Gets search Results from Search Service.
      Returns:
      List of Manuscripts
    • getType

      public String getType()
      Gets Type of content view.
      Specified by:
      getType in interface IAnnoViewService
      Returns:
      type of content view as String
    • updateModel

      public void updateModel(org.springframework.ui.Model model)
      Update Model with everything from AnnoViewService.
      Parameters:
      model - the holder for model attributes, used to pass attributes back to the view
    • getData

      public org.springframework.boot.configurationprocessor.json.JSONArray getData() throws org.springframework.boot.configurationprocessor.json.JSONException
      Gets results and formats them in JSON Array for table to read.
      Returns:
      table data as JSONArray
      Throws:
      org.springframework.boot.configurationprocessor.json.JSONException - if the data could not be parsed to a JSONObject