<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%> <%@ page import="java.util.*"%> <%@ page import="java.net.URLEncoder"%> <%@ page import="edu.cornell.mannlib.vitro.webapp.beans.*" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %> <%@ page errorPage="/error.jsp"%> <% /*********************************************** Display a}x9n;:[ Search Results request.attributes: a Map object with the name "collatedResultsLists" collatedGroupNames request.parameters: None yet. Consider sticking < % = MiscWebUtils.getReqInfo(request) % > in the html output for debugging info. **********************************************/ if (request.getAttribute("collatedResultsLists") == null) { String e = "searchBaisc.jsp expects that request attribute " + "'collatedResultsLists' be set to a Map of Lists of results to display."; throw new JspException(e); } if (request.getAttribute("collatedGroupNames") == null) { String e = "searchBaisc.jsp expects that request attribute " + "'collatedGroupNames' be set to a list of keys in collatedResultsLists."; throw new JspException(e); } int switchdivs = 0; // for making IDs for the plus-icon expansion divs edu.cornell.mannlib.vitro.webapp.beans.Portal portal = (Portal) request.getAttribute("portalBean"); int portalId = portal.getPortalId(); Map results = (Map) request.getAttribute("collatedResultsLists"); out.println("
"); //do classgroup toc Iterator it = results.keySet().iterator(); out.println("

Jump to results of type: "); while (it.hasNext()) { Object key = it.next(); VClassGroup grp = (VClassGroup) results.get(key); out.println(" " + key + " "); } out.println("

"); //get each ClassGroup it = results.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); VClassGroup grp = (VClassGroup) results.get(key); out.println("

" + key + "

"); //get each VClassList Iterator it2 = grp.iterator(); while (it2.hasNext()) { VClassList vcl = (VClassList) it2.next(); int resultSetSize = vcl.getEntities().size(); int displayLimit = vcl.getDisplayLimit(); if (resultSetSize - displayLimit == 1) ++displayLimit; boolean hiddenDivStarted = false; out.println("

" + vcl.getName() + " (" + resultSetSize + ")

"); out.println(" <% out.println(" "); } } // END while it3.hasNext() if (!hiddenDivStarted) { out.println(""); } } // END else have entities } // END while it2.hasNext() } // END while it.hasNext() %>