com.sun.labs.minion.test
Class QueryTest.DisplaySpec

java.lang.Object
  extended by com.sun.labs.minion.test.QueryTest.DisplaySpec
Enclosing class:
QueryTest

protected class QueryTest.DisplaySpec
extends java.lang.Object

A class that is used to format for display the information from a document hit.


Field Summary
protected  java.lang.String[] fields
          The fields we'll display.
protected  TextHighlighter th
           
 
Constructor Summary
QueryTest.DisplaySpec(java.lang.String s)
          Makes a display spec from a string representation.
 
Method Summary
protected  void displayPassages(Result r)
          Displays the passages associated with a given result.
 void format(Result r)
          Format a result.
 void format(java.lang.String prefix, Result r)
          Format a result.
 java.lang.String reformat(java.lang.String text, java.lang.String prefix, int column)
          Reformats a string to fit within a given number of columns with a given prefix on each line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fields

protected java.lang.String[] fields
The fields we'll display.


th

protected TextHighlighter th
Constructor Detail

QueryTest.DisplaySpec

public QueryTest.DisplaySpec(java.lang.String s)
Makes a display spec from a string representation. The representation is a comma separated list of field names. In addition to the names defined in a given index, the user may use the sequences \n and \t to display newlines or tabs in the output.

Method Detail

format

public void format(Result r)
Format a result.


format

public void format(java.lang.String prefix,
                   Result r)
Format a result.


displayPassages

protected void displayPassages(Result r)
Displays the passages associated with a given result.


reformat

public java.lang.String reformat(java.lang.String text,
                                 java.lang.String prefix,
                                 int column)
Reformats a string to fit within a given number of columns with a given prefix on each line.