<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.utils.HTTPUtils" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Institution" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Transcription" %> <%@ page import="org.crosswire.xml.XMLBlock" %> <%@ page import="org.crosswire.webtools.annotation.*" %> <%@ page import="org.crosswire.webtools.*" %> <%! @Description(value = "Retrieve list of institution names.", name = "institute/getnames") public static class MyParameters extends Parameters { @Description(value = "show only values for institutions within a specified country", example = "Germany") public String country; @Description(value = "show only values for institutions within a specified place", example = "Münster") public String place; @Description(value = "show only values for institutions with custom institution names populated", defaultValue = "false", example = "true") public Boolean customInstNamesOnly = false; @Description(value = "show usage for this web service", defaultValue = "false", example = "true") public Boolean usage = false; @Description(value = "only show Liste catalog objects", defaultValue = "false", example = "true") public Boolean listeOnly = false; @Override protected void afterLoad() { country = Transcription.assureUnicode(country); place = Transcription.assureUnicode(place); } } %> <% MyParameters params = new MyParameters().loadFromRequest(request, response, false); if (params.getErrors().size() == 0 && !params.usage) { StringBuffer retVal = new StringBuffer(); retVal.append(""); for (Institution i: Institution.getInstitutions(params.country, params.place, params.customInstNamesOnly, params.listeOnly)) { retVal.append(i.toFormattedXML(i.DETAIL_HEADERONLY)); } retVal.append(""); Serializer.output(response, out, params, XMLBlock.createXMLBlock(retVal.toString())); return; } else params.format = "html"; Serializer.reportErrors(request, response, out, params, true); %>