gov.nist.nlpir.irf.result
Class RetrievalResult

java.lang.Object
  |
  +--gov.nist.nlpir.irf.result.RetrievalResult

public class RetrievalResult
extends java.lang.Object

The result of a search modelling the match between a query and a document collection.

This is the highest level of search result. Each element summarizes the results for a document. It is sortable but not sorted at creation.

Version:
$Revision: 1.1 $
Author:
This software was produced by NIST, an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification and maintenance.

Field Summary
private  java.util.Vector resultList
          Contains the set of results for individual documents (ResultForDocMatchingQuery) which match the query.
 
Constructor Summary
RetrievalResult(java.util.Vector results)
          Creates a RetrievalResult for the supplied results.
 
Method Summary
 ProxyDocument getDocNo(int number)
          Returns the number-th document in the list.
 ResultForDocMatchingQuery getListElementNo(int i)
          Returns the i-th element of the list.
 java.util.Vector getResultVector()
          Returns the whole list of results as a vector.
 int getSize()
          Returns number of documents in the result
 void present(boolean interactive)
          Presents the elements of the list of results.
 void setResultVector(java.util.Vector c)
          Makes the result list equal to the argument.
 void sort()
          Sorts the result based on criteria for comparing ResultForDocMatchingQuery objects
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

resultList

private java.util.Vector resultList
Contains the set of results for individual documents (ResultForDocMatchingQuery) which match the query.
Constructor Detail

RetrievalResult

public RetrievalResult(java.util.Vector results)
Creates a RetrievalResult for the supplied results.
Parameters:
results - contains ResultForDocMatchingQuery elements.
Method Detail

sort

public void sort()
Sorts the result based on criteria for comparing ResultForDocMatchingQuery objects

present

public void present(boolean interactive)
Presents the elements of the list of results.
Parameters:
interactive - The default value FALSE means that it will not be interactive. Interactive means that the user will be asked if they want to see more elements.

getDocNo

public ProxyDocument getDocNo(int number)
Returns the number-th document in the list.
Parameters:
number - index of desired document.
Returns:
The requested Document or null if number is an invalid list index.

getListElementNo

public ResultForDocMatchingQuery getListElementNo(int i)
Returns the i-th element of the list.
Parameters:
i - index of desired document.
Returns:
The requested element.

getSize

public int getSize()
Returns number of documents in the result
Returns:
number of documents in the result

getResultVector

public java.util.Vector getResultVector()
Returns the whole list of results as a vector.
Returns:
The whole result list.

setResultVector

public void setResultVector(java.util.Vector c)
Makes the result list equal to the argument.
Parameters:
c - The new list.