<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.community.projects.ntmss.data.ShelfInstance" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Document" %> <% int detail = ShelfInstance.DETAIL_COMPLETE; if ("header".equals(request.getParameter("detail"))) detail = ShelfInstance.DETAIL_HEADERONLY; else if ("extra".equals(request.getParameter("detail"))) detail = ShelfInstance.DETAIL_EXTRA; int docID = -1; try {docID = Integer.parseInt(request.getParameter("docID"));} catch (Exception e){} int instID = -1; try {instID = Integer.parseInt(request.getParameter("instID"));} catch (Exception e){} int shelfID = -1; try {shelfID = Integer.parseInt(request.getParameter("shelfID"));} catch (Exception e){} String gaNum = request.getParameter("gaNum"); if (shelfID > -1 || instID > -1 || docID > -1 || gaNum != null) { response.setContentType("text/xml"); // --------------------------------------------- if (gaNum != null) { Document doc = Document.getDocumentByGANumber(gaNum); docID = doc.getDocumentID(); } ShelfInstance insts[] = null; if (shelfID > -1) { ShelfInstance si = ShelfInstance.getShelfInstance(shelfID); if (si != null) { insts = new ShelfInstance[1]; insts[0] = si; } } else if (instID > -1) { insts = ShelfInstance.getShelfInstances(instID); } else if (docID > -1) { insts = ShelfInstance.getShelfInstancesHoldingDocument(docID); } if (insts != null) { %> <% for (ShelfInstance si : insts) { out.print(si.toFormattedXML(detail)); } %> <% } else { out.print(""); } return; } %>

shelfinstance/get

Retrieve detailed information about a shelfinstance

Parameters

shelfIDid of the individual shelf instance to retrieve (specify either shelfID | docID | instID)
docIDid of the manuscript for which to retrieve all shelf instances
gaNumGregory-Aland number of the manuscript for which to retrieve all shelf instances
instIDid of the institution for which to retrieve all shelf instances
detail[header|(complete)|extra]