01: /*
02: Lucene-Highlighting � Lucene utilities to highlight terms in texts
03: Copyright (C) 2001 Maik Schreiber
04: This library is free software; you can redistribute it and/or modify it
05: under the terms of the GNU Lesser General Public License as published by
06: the Free Software Foundation; either version 2.1 of the License, or
07: (at your option) any later version.
08: This library is distributed in the hope that it will be useful, but
09: WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10: or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11: License for more details.
12: You should have received a copy of the GNU Lesser General Public
13: License along with this library; if not, write to the Free Software
14: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15: */
16: package vqwiki.utils.lucene;
17:
18: /**
19: * Highlights arbitrary terms.
20: *
21: * @version $Id: TermHighlighter.java 365 2003-10-05 05:07:32Z garethc $
22: * @author Maik Schreiber (mailto: bZ@iq-computing.de)
23: */
24: public interface TermHighlighter {
25: /**
26: * Highlight an arbitrary term. For example, an HTML TermHighlighter could simply do:
27: *
28: * <p><dl><dt></dt><dd><code>return "<b>" + term + "</b>";</code></dd></dl>
29: *
30: * @param term term text to highlight
31: * @return highlighted term text
32: */
33: String highlightTerm(String term);
34: }
|