goci-interfaces/goci-curation/src/main/java/uk/ac/ebi/spot/goci/curation/controller/StudyController.java
// Generate page with housekeeping/curator information linked to a study
Generate page with housekeeping/curator information linked to a study
Generate page with housekeeping / curator information linked to a study
@RequestMapping(value = "/{studyId}/housekeeping", produces = MediaType.TEXT_HTML_VALUE, method = RequestMethod.GET)
    public String viewStudyHousekeeping(Model model, @PathVariable Long studyId) {
        Study study = studyRepository.findOne(studyId);
        if (study.getHousekeeping() == null) {
            model.addAttribute("studyHousekeeping", new Housekeeping());
        }
        else {
            model.addAttribute("studyHousekeeping", study.getHousekeeping());
        }
        model.addAttribute("study", study);
        model.addAttribute("mappingDetails", mappingDetailsService.createMappingSummary(study));
        return "study_housekeeping";
    }
@ RequestMapping ( value = "/{studyId}/housekeeping" , produces = MediaType . TEXT_HTML_VALUE , method = RequestMethod . GET ) public String viewStudyHousekeeping ( Model model , @ PathVariable Long studyId ) { Study study = studyRepository . findOne ( studyId ) ; if ( study . getHousekeeping ( ) == null ) { model . addAttribute ( "studyHousekeeping" , new Housekeeping ( ) ) ; } else { model . addAttribute ( "studyHousekeeping" , study . getHousekeeping ( ) ) ; } model . addAttribute ( "study" , study ) ; model . addAttribute ( "mappingDetails" , mappingDetailsService . createMappingSummary ( study ) ) ; return "study_housekeeping" ; }
Generate page with housekeeping/curator information linked to a study
Generate page with housekeeping / curator information linked to a study
// Find study // If we don't have a housekeeping object create one, this should not occur though as they are created when study is created // Return the housekeeping object attached to study and return the study // Return a DTO that holds a summary of any automated mappings