<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="java.util.List" %> <%@ page import="org.crosswire.data.DataObject" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Document" %> <%@ 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 places.", name = "institute/getplaces") 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 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); } } %> <% MyParameters params = new MyParameters().loadFromRequest(request, response, false); if (params.getErrors().size() == 0 && !params.usage) { List places = Document.getPlaces(params.country, params.customInstNamesOnly, params.listeOnly); StringBuffer retVal = new StringBuffer(); retVal.append(""); for (DataObject p: places) { retVal.append("" + p.getStringValue("PLACE") + ""); } retVal.append(""); Serializer.output(response, out, params, XMLBlock.createXMLBlock(retVal.toString())); return; } else params.format = "html"; Serializer.reportErrors(request, response, out, params, true); %>