net.jot.search.simpleindexer
Class JOTSearchResult

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable
          extended by net.jot.search.simpleindexer.JOTSearchResult
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class JOTSearchResult
extends java.util.Hashtable

Represented an entry of the sorted search result (ie: a file) This is of type hashtable, so that a user writing it's own JOTSearchsorter implementation could add it's own extra element data

Author:
tcolar
See Also:
Serialized Form

Field Summary
static java.lang.String BEST_LINE
           
static java.lang.String BEST_LINE_SCORE
           
static java.lang.String HITS
           
static java.lang.String ID
           
static java.lang.String SCORE
           
 
Constructor Summary
JOTSearchResult(java.lang.String id, int score, int hits, int bestLine, int bestLineScore)
          creates an entry with specific id,score,hits
 
Method Summary
 int getBestLine()
          line number of best line
 int getBestLineScore()
          how many of the keywords on the best line
 java.lang.Integer getHits()
          total number of keywords hits in whole file
 java.lang.String getID()
          return uniqueId of the matching entry(ex: filename)
 int getScore()
          score 0 to 10 (how many of the keywords where found in the file)
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values

SCORE

public static final java.lang.String SCORE
See Also:
Constant Field Values

HITS

public static final java.lang.String HITS
See Also:
Constant Field Values

BEST_LINE

public static final java.lang.String BEST_LINE
See Also:
Constant Field Values

BEST_LINE_SCORE

public static final java.lang.String BEST_LINE_SCORE
See Also:
Constant Field Values
Constructor Detail

JOTSearchResult

public JOTSearchResult(java.lang.String id,
                       int score,
                       int hits,
                       int bestLine,
                       int bestLineScore)
creates an entry with specific id,score,hits

Parameters:
id -
score -
hits -
Method Detail

getScore

public int getScore()
score 0 to 10 (how many of the keywords where found in the file)

Returns:

getBestLineScore

public int getBestLineScore()
how many of the keywords on the best line

Returns:

getBestLine

public int getBestLine()
line number of best line

Returns:

getHits

public java.lang.Integer getHits()
total number of keywords hits in whole file

Returns:

getID

public java.lang.String getID()
return uniqueId of the matching entry(ex: filename)

Returns: