<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.community.RightsAndRoles" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Apparatus" %> <% int fromSegmentReadingID = -1; try {fromSegmentReadingID = Integer.parseInt(request.getParameter("fromSegmentReadingID"));} catch (Exception e){} int toSegmentReadingID = -1; try {toSegmentReadingID = Integer.parseInt(request.getParameter("toSegmentReadingID"));} catch (Exception e){} if (fromSegmentReadingID > -1 && toSegmentReadingID > -1) { response.setContentType("text/xml"); // let's check to see if we're a privileged user boolean permission = RightsAndRoles.hasRole(request, response, "VMR Administrator"); // --------------------------------------------- if (permission) { Apparatus.reassignSegmentReading(fromSegmentReadingID, toSegmentReadingID); %> <% System.out.println("successfully reassigned all witnesses with reading id: "+fromSegmentReadingID+", to reading id: "+toSegmentReadingID); } else { %> <% } return; } %>

variant/reading/reassign

Reassign all witness from a reading to a different reading

Parameters

fromSegmentReadingIDsegment reading id to reassign
toSegmentReadingIDnew value for segment reading id