edu.mayo.informatics.indexer.lucene.hitcollector
Class AbstractBestScoreOfEntityHitCollector<T>

java.lang.Object
  extended by org.apache.lucene.search.HitCollector
      extended by edu.mayo.informatics.indexer.lucene.hitcollector.AbstractBestScoreOfEntityHitCollector<T>
Direct Known Subclasses:
BestScoreOfEntityHitCollector, BitSetBestScoreOfEntityHitCollector

public abstract class AbstractBestScoreOfEntityHitCollector<T>
extends org.apache.lucene.search.HitCollector

The Class BestScoreOfEntityHitCollector.

Author:
Kevin Peterson

Nested Class Summary
protected static class AbstractBestScoreOfEntityHitCollector.ScoreComparator
          The Class ScoreComparator.
 
Constructor Summary
AbstractBestScoreOfEntityHitCollector(org.apache.lucene.search.DocIdSetIterator boundryDocIterator, int maxDoc)
          Instantiates a new best score of entity hit collector.
 
Method Summary
protected abstract  void addToReturnValue(T results, int docId, float score)
           
 void collect(int docId, float score)
           
protected  int getEndOfBoundary()
           
protected  int getMaxDoc()
           
 T getResult()
          Gets the score docs.
protected  int getStartOfBoundary()
           
protected abstract  T initializeResults()
           
protected  void postProcess()
          Post process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBestScoreOfEntityHitCollector

public AbstractBestScoreOfEntityHitCollector(org.apache.lucene.search.DocIdSetIterator boundryDocIterator,
                                             int maxDoc)
Instantiates a new best score of entity hit collector.

Parameters:
boundryDocIterator - the boundry doc iterator
Method Detail

initializeResults

protected abstract T initializeResults()

collect

public void collect(int docId,
                    float score)
Specified by:
collect in class org.apache.lucene.search.HitCollector

getResult

public T getResult()
Gets the score docs.

Returns:
the score docs

getStartOfBoundary

protected int getStartOfBoundary()

getEndOfBoundary

protected int getEndOfBoundary()

getMaxDoc

protected int getMaxDoc()

postProcess

protected void postProcess()
Post process.


addToReturnValue

protected abstract void addToReturnValue(T results,
                                         int docId,
                                         float score)

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.