org.tm4j.topicmap.index.text
Class LuceneQueryHitImpl

java.lang.Object
  extended byorg.tm4j.topicmap.index.text.LuceneQueryHitImpl
All Implemented Interfaces:
QueryHit, java.io.Serializable

public class LuceneQueryHitImpl
extends java.lang.Object
implements QueryHit, java.io.Serializable

This is an implementation of QueryHit for the Lucene Full Text Engine

Author:
Harald Kuhn, harald_kuhn at users.sourceforge.net
See Also:
Serialized Form

Constructor Summary
LuceneQueryHitImpl(org.apache.lucene.document.Document doc, TopicMap map, float score)
           
 
Method Summary
 TopicMapObject getObject()
          Returns the TopicMapObject which is associated with this Hit The String value that caused the hit is probably stored in one of the properties of the object.
 float getScore()
          Returns the score rating given to this hit by the used search engine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneQueryHitImpl

public LuceneQueryHitImpl(org.apache.lucene.document.Document doc,
                          TopicMap map,
                          float score)
Method Detail

getObject

public TopicMapObject getObject()
Description copied from interface: QueryHit
Returns the TopicMapObject which is associated with this Hit The String value that caused the hit is probably stored in one of the properties of the object. The field is dependant of the concrete implementation returned. Occurrence data or dataLocator // depends on wether use uri´s is activated BaseName data Variant variantName.data

Specified by:
getObject in interface QueryHit
Returns:
the TopicMapObject which contains the hit in its value

getScore

public float getScore()
Description copied from interface: QueryHit
Returns the score rating given to this hit by the used search engine

Specified by:
getScore in interface QueryHit
Returns:
a boolean value ranging from 0 to 1