org.activemath.omdocjdom.index.queries
Class SearchResultHits

java.lang.Object
  extended by org.activemath.omdocjdom.index.queries.SearchResultHits
All Implemented Interfaces:
IndexConstants

public class SearchResultHits
extends Object
implements IndexConstants


Field Summary
 
Fields inherited from interface org.activemath.omdocjdom.index.IndexConstants
FIELDNAME_id, FIELDNAME_metadata, FIELDNAME_type, LANG_ALL, LANG_UNIVERSAL, SUBFIELDNAME_field, SUBFIELDNAME_learningContext
 
Constructor Summary
SearchResultHits(org.apache.lucene.search.Hits hits)
           
SearchResultHits(List list, float defaultScore)
           
 
Method Summary
 List<MBaseID> asIdList()
           
 int docNum(int i)
           
 long getDuration()
          Returns the difference in milliseconds between calls to setStartTime(long) and setEndTime().
 String id(int i)
           
 int length()
           
 float score(int i)
           
 void setEndTime()
          Indicates the end time of the search.
 void setStartTime(long startTime)
          Indicates thet start-time of the search.
 String type(int i, MBaseRef mbaseRef)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResultHits

public SearchResultHits(org.apache.lucene.search.Hits hits)

SearchResultHits

public SearchResultHits(List list,
                        float defaultScore)
Parameters:
list - a list of MBaseID objects
Method Detail

score

public float score(int i)
            throws IOException
Throws:
IOException

docNum

public int docNum(int i)
           throws IOException
Throws:
IOException

id

public String id(int i)
          throws IOException
Throws:
IOException

length

public int length()

type

public String type(int i,
                   MBaseRef mbaseRef)

asIdList

public List<MBaseID> asIdList()
Returns:
a list of MBaseIDs.

setStartTime

public void setStartTime(long startTime)
Indicates thet start-time of the search.


setEndTime

public void setEndTime()
Indicates the end time of the search.


getDuration

public long getDuration()
Returns the difference in milliseconds between calls to setStartTime(long) and setEndTime().