<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page trimDirectiveWhitespaces="true" %> <%@ page import="org.crosswire.utils.Sessions" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Feature" %> <%@ page import="org.crosswire.community.projects.ntmss.data.Transcription" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.Arrays" %> <%@ page import="java.util.Comparator" %> <% String userName = Sessions.getSessionStringValue(request, "userName"); int limit = 50; try { limit = Integer.parseInt(request.getParameter("limit")); } catch (Exception e) {} String featureCode = request.getParameter("featureCode"); String likeMatch = request.getParameter("likeMatch"); likeMatch = Transcription.assureUnicode(likeMatch); //System.out.println("likeMatch: "+ likeMatch); if (featureCode != null) { response.setContentType("text/xml"); Map featureDefs = Feature.getFeatureDefinitions(true, userName); Feature.FeatureDefinition feature = featureDefs.get(featureCode); if (feature == null) { %> <% return; } %> <% for (Feature.FeatureDefinition.SearchHit h : feature.getValues(limit, likeMatch)) { %> <%=h.value%> <% } %> <% return; } %>

feature/definition/getvalues

Retrieve a list of values for a given feature code

Parameters

featureCodethe feature code for which to retrieve values
likeMatchshow only values %likeMatch%
limitthe maximum number of results to retrieve (default 50)