<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.xml.XMLBlock" %> <%@ page import="java.util.List" %> <%@ page import="java.util.Collections" %> <%@ page import="java.util.Arrays" %> <%@ page import="java.util.List" %> <%@ page import="java.util.ArrayList" %> <%@ page import="org.apache.log4j.Logger" %> <%@ page import="org.crosswire.webtools.annotation.*" %> <%@ page import="org.crosswire.webtools.*" %> <%@ page import="org.crosswire.data.DataObject" %> <%@ page import="org.crosswire.utils.HTTPUtils" %> <%! @Description(value = "Perform sanity checks on various parts of the dataset", name = "integritycheck/shelfinstance") public static class MyParameters extends Parameters { @Description(value = "Show this usage help", example = "true", defaultValue = "false") public Boolean help = false; // format(html) | xml @Override protected void afterLoad() { } @Override protected void customValidation() { } } %> <% MyParameters params = new MyParameters().loadFromRequest(request, response, false); String format = request.getParameter("format"); if (format == null) ((Parameters)params).format = "html"; if (params.getErrors().size() == 0 && !params.help) { boolean html = "html".equals(params.format); StringBuffer results = new StringBuffer(); String baseURL = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort(); // + request.getContextPath(); DataObject query = new DataObject(); String sql = "select SI.*, COUNT(PAGEID) PAGECOUNT, GROUP_CONCAT(distinct DOCUMENTID SEPARATOR ', ') DOCIDS from SHELFINSTANCE SI left join INSTITUTION I on I.INSTITUTIONID = SI.INSTITUTIONID left join SHELFINSTANCEPAGES SIP on SIP.SHELFID=SI.SHELFID where NAME is null GROUP BY SHELFID"; List rows = query.getDataSet(sql); if (html) { results.append("

Shelf Instances with no institution

"); results.append(""); } else { results.append(""); } for (DataObject d : rows) { if (html) { results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); results.append(""); https://ntvmr.uni-muenster.de/group/vmr-administration/page-and-image?instID=200 results.append(""); results.append(""); } else { results.append("\n"); } } if (html) results.append("
Shelf IDShelf NumberFormerGAContentLeaves DescLeavesDatePage's AssignedDocIDsCreated OnFixMeURL
"+d.getStringValue("SHELFID")+""+d.getStringValue("SHELFNUMBER")+""+d.getStringValue("FORMERGANUMBER")+""+d.getStringValue("CONTENTOVERVIEW")+""+d.getStringValue("LEAVESDESCRIPTION")+""+d.getStringValue("LEAVES")+""+d.getStringValue("ORIGINYEARDESCRIPTION")+""+d.getStringValue("PAGECOUNT")+""+d.getStringValue("DOCIDS")+""+d.getStringValue("CREATEDATE")+"fix me
"); else results.append(""); if (html) { %> <%=results%> <% } else { response.setContentType("text/xml"); %> <%=results%> <% } return; } ((Parameters)params).format = "html"; Serializer.reportErrors(request, response, out, params, true); %>