Results.java revision 1195
98N/A * CDDL HEADER START 98N/A * The contents of this file are subject to the terms of the 98N/A * Common Development and Distribution License (the "License"). 919N/A * You may not use this file except in compliance with the License. 919N/A * language governing permissions and limitations under the License. 919N/A * When distributing Covered Code, include this CDDL HEADER in each 919N/A * If applicable, add the following below this CDDL HEADER, with the 919N/A * fields enclosed by brackets "[]" replaced with your own identifying 919N/A * information: Portions Copyright [yyyy] [name of copyright owner] 919N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 919N/A * Portions Copyright 2011 Jens Elkner. 810N/A * @author Chandan slightly rewritten by Lubos Kosco 810N/A // Util class, should not be constructed 810N/A * Create a has map keyed by the directory of the document found. 810N/A * @param searcher searcher to use. 810N/A * @param hits hits produced by the given searcher's search 810N/A * @param startIdx the index of the first hit to check 810N/A * @param stopIdx the index of the last hit to check 810N/A * @return a (directory, hitDocument) hashmap 851N/A * @throws CorruptIndexException 366N/A // Grrrrrrrrrrrrr - TagFilter takes Readers, only!!!! 354N/A // Why? Is it CS sensible? 366N/A * Prints out results in html form. The following search helper fields are 499N/A * required to be properly initialized: 98N/A * <li>{@link SearchHelper#dataRoot}</li> 98N/A * <li>{@link SearchHelper#contextPath}</li> 98N/A * <li>{@link SearchHelper#searcher}</li> 98N/A * <li>{@link SearchHelper#hits}</li> 851N/A * <li>{@link SearchHelper#historyContext} (ignored if {@code null})</li> 577N/A * <li>{@link SearchHelper#sourceContext} (ignored if {@code null})</li> 498N/A * <li>{@link SearchHelper#summerizer} (if sourceContext is not {@code null})</li> 98N/A * <li>{@link SearchHelper#compressed} (if sourceContext is not {@code null})</li> 98N/A * <li>{@link SearchHelper#sourceRoot} (if sourceContext or historyContext 98N/A * is not {@code null})</li> 744N/A * @param out write destination 747N/A * @param sh search helper which has all required fields set 744N/A * @param start index of the first hit to print 744N/A * @param end index of the last hit to print 744N/A * @throws HistoryException 493N/A * @throws ClassNotFoundException out.
write(
"<tr class=\"dir\"><td colspan=\"3\"><a href=\"");
out.
write(
"<tr><td class=\"q\"><a href=\"");
out.
write(
"\" title=\"History\">H</a> <a href=\"");
out.
write(
"?a=true\" title=\"Annotate\">A</a> <a href=\"");
out.
write(
"\" title=\"Download\">D</a>");
out.
write(
"<td class=\"f\"><a href=\"");
out.
write(
"</a></td><td><tt class=\"con\">");
// FIXME use Highlighter from lucene contrib here, // instead of summarizer, we'd also get rid of // apache lucene in whole source ...