use of uk.ac.ebi.spot.goci.curation.model.MappingDetails in project goci by EBISPOT.
the class AssociationController method removeColEditMode.
// Remove column from table
@RequestMapping(value = "/associations/{associationId}", params = { "removeCol" })
public String removeColEditMode(SnpAssociationInteractionForm snpAssociationInteractionForm, HttpServletRequest req, Model model, @PathVariable Long associationId) {
// Index of value to remove
final Integer colId = Integer.valueOf(req.getParameter("removeCol"));
// Remove col
snpAssociationInteractionForm.getSnpFormColumns().remove(colId.intValue());
// Pass back updated form
model.addAttribute("form", snpAssociationInteractionForm);
// Also passes back study object to view so we can create links back to main study page
Association currentAssociation = associationRepository.findOne(associationId);
Study associationStudy = currentAssociation.getStudy();
Long studyId = associationStudy.getId();
model.addAttribute("study", studyRepository.findOne(studyId));
// Determine if association is an OR or BETA type
String measurementType = associationOperationsService.determineIfAssociationIsOrType(currentAssociation);
model.addAttribute("measurementType", measurementType);
// Get mapping details
MappingDetails mappingDetails = associationOperationsService.createMappingDetails(currentAssociation);
model.addAttribute("mappingDetails", mappingDetails);
// Return any association errors
model.addAttribute("errors", associationValidationReportService.generateAssociationWarningsListView(associationId));
return "edit_snp_interaction_association";
}
Aggregations