Class SortaController


  • @Controller
    @RequestMapping("/plugin/sorta")
    public class SortaController
    extends org.molgenis.web.PluginController
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static double DEFAULT_THRESHOLD  
      static java.lang.String ID  
      static java.lang.String MATCH_VIEW_NAME  
      static java.lang.String URI  
      • Fields inherited from class org.molgenis.web.PluginController

        PLUGIN_URI_PREFIX
    • Constructor Summary

      Constructors 
      Constructor Description
      SortaController​(org.molgenis.ontology.core.service.OntologyService ontologyService, SortaService sortaService, org.molgenis.security.user.UserAccountService userAccountService, org.molgenis.data.file.FileStore fileStore, org.molgenis.security.core.UserPermissionEvaluator permissionService, org.molgenis.data.DataService dataService, org.molgenis.web.menu.MenuReaderService menuReaderService, org.molgenis.data.populate.IdGenerator idGenerator, org.molgenis.data.security.permission.PermissionSystemService permissionSystemService, MatchingTaskContentMetaData matchingTaskContentMetaData, SortaJobExecutionMetadata sortaJobExecutionMetaData, org.molgenis.ontology.core.meta.OntologyTermMetadata ontologyTermMetadata, SortaJobExecutionFactory sortaJobExecutionFactory, org.molgenis.data.meta.model.EntityTypeFactory entityTypeFactory, org.molgenis.data.meta.model.AttributeFactory attrMetaFactory, org.molgenis.jobs.JobExecutor jobExecutor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> countMatchResult​(java.lang.String sortaJobExecutionId)  
      java.lang.String deleteResult​(java.lang.String sortaJobExecutionId, org.springframework.ui.Model model)  
      void download​(java.lang.String sortaJobExecutionId, javax.servlet.http.HttpServletResponse response)  
      SortaServiceResponse findMatchingOntologyTerms​(java.util.Map<java.lang.String,​java.lang.Object> request)  
      java.util.List<SortaJobExecution> getJobs()  
      java.lang.String init​(org.springframework.ui.Model model)  
      java.lang.String match​(java.lang.String jobName, java.lang.String ontologyIri, java.lang.String inputTerms, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest httpServletRequest)  
      java.lang.String matchResult​(java.lang.String sortaJobExecutionId, org.springframework.ui.Model model)  
      java.lang.String matchTask​(org.springframework.ui.Model model)  
      EntityCollectionResponse retrieveSortaJobResults​(SortaServiceRequest sortaServiceRequest)  
      java.lang.String updateThreshold​(java.lang.String threshold, java.lang.String sortaJobExecutionId, org.springframework.ui.Model model)  
      java.lang.String upload​(java.lang.String jobName, java.lang.String ontologyIri, org.springframework.web.multipart.MultipartFile file, org.springframework.ui.Model model, javax.servlet.http.HttpServletRequest httpServletRequest)  
      • Methods inherited from class org.molgenis.web.PluginController

        getId, getPluginSettings, getUri
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SortaController

        public SortaController​(org.molgenis.ontology.core.service.OntologyService ontologyService,
                               SortaService sortaService,
                               org.molgenis.security.user.UserAccountService userAccountService,
                               org.molgenis.data.file.FileStore fileStore,
                               org.molgenis.security.core.UserPermissionEvaluator permissionService,
                               org.molgenis.data.DataService dataService,
                               org.molgenis.web.menu.MenuReaderService menuReaderService,
                               org.molgenis.data.populate.IdGenerator idGenerator,
                               org.molgenis.data.security.permission.PermissionSystemService permissionSystemService,
                               MatchingTaskContentMetaData matchingTaskContentMetaData,
                               SortaJobExecutionMetadata sortaJobExecutionMetaData,
                               org.molgenis.ontology.core.meta.OntologyTermMetadata ontologyTermMetadata,
                               SortaJobExecutionFactory sortaJobExecutionFactory,
                               org.molgenis.data.meta.model.EntityTypeFactory entityTypeFactory,
                               org.molgenis.data.meta.model.AttributeFactory attrMetaFactory,
                               org.molgenis.jobs.JobExecutor jobExecutor)
    • Method Detail

      • init

        @GetMapping
        public java.lang.String init​(org.springframework.ui.Model model)
      • getJobs

        @GetMapping("/jobs")
        @ResponseBody
        public java.util.List<SortaJobExecution> getJobs()
      • matchTask

        @GetMapping("/newtask")
        public java.lang.String matchTask​(org.springframework.ui.Model model)
      • updateThreshold

        @PostMapping("/threshold/{sortaJobExecutionId}")
        public java.lang.String updateThreshold​(@RequestParam("threshold")
                                                java.lang.String threshold,
                                                @PathVariable
                                                java.lang.String sortaJobExecutionId,
                                                org.springframework.ui.Model model)
      • matchResult

        @GetMapping("/result/{sortaJobExecutionId}")
        public java.lang.String matchResult​(@PathVariable("sortaJobExecutionId")
                                            java.lang.String sortaJobExecutionId,
                                            org.springframework.ui.Model model)
      • countMatchResult

        @GetMapping("/count/{sortaJobExecutionId}")
        @ResponseBody
        public java.util.Map<java.lang.String,​java.lang.Object> countMatchResult​(@PathVariable("sortaJobExecutionId")
                                                                                       java.lang.String sortaJobExecutionId)
      • deleteResult

        @PostMapping("/delete/{sortaJobExecutionId}")
        @ResponseStatus(OK)
        public java.lang.String deleteResult​(@PathVariable("sortaJobExecutionId")
                                             java.lang.String sortaJobExecutionId,
                                             org.springframework.ui.Model model)
      • match

        @PostMapping("/match")
        public java.lang.String match​(@RequestParam("taskName")
                                      java.lang.String jobName,
                                      @RequestParam("selectOntologies")
                                      java.lang.String ontologyIri,
                                      @RequestParam("inputTerms")
                                      java.lang.String inputTerms,
                                      org.springframework.ui.Model model,
                                      javax.servlet.http.HttpServletRequest httpServletRequest)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • upload

        @PostMapping(value="/match/upload",
                     headers="Content-Type=multipart/form-data")
        public java.lang.String upload​(@RequestParam("taskName")
                                       java.lang.String jobName,
                                       @RequestParam("selectOntologies")
                                       java.lang.String ontologyIri,
                                       @RequestParam("file")
                                       org.springframework.web.multipart.MultipartFile file,
                                       org.springframework.ui.Model model,
                                       javax.servlet.http.HttpServletRequest httpServletRequest)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • findMatchingOntologyTerms

        @PostMapping("/match/entity")
        @ResponseBody
        public SortaServiceResponse findMatchingOntologyTerms​(@RequestBody
                                                              java.util.Map<java.lang.String,​java.lang.Object> request)
      • download

        @GetMapping("/match/download/{sortaJobExecutionId}")
        public void download​(@PathVariable
                             java.lang.String sortaJobExecutionId,
                             javax.servlet.http.HttpServletResponse response)
                      throws java.io.IOException
        Throws:
        java.io.IOException