net.semanticmetadata.lire.impl
Class SimpleImageSearchHits

java.lang.Object
  extended by net.semanticmetadata.lire.impl.SimpleImageSearchHits
All Implemented Interfaces:
ImageSearchHits

public class SimpleImageSearchHits
extends java.lang.Object
implements ImageSearchHits

This file is part of the Caliph and Emir project: http://www.SemanticMetadata.net
Date: 02.02.2006
Time: 23:56:15

Author:
Mathias Lux, mathias@juggle.at

Constructor Summary
SimpleImageSearchHits(java.util.Collection<SimpleResult> results, float maxDistance)
           
 
Method Summary
 org.apache.lucene.document.Document doc(int position)
          Returns the document at given position
 int length()
          Returns the size of the result list.
 float score(int position)
          Returns the score of the document at given position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleImageSearchHits

public SimpleImageSearchHits(java.util.Collection<SimpleResult> results,
                             float maxDistance)
Method Detail

length

public int length()
Returns the size of the result list.

Specified by:
length in interface ImageSearchHits
Returns:
the size of the result list.

score

public float score(int position)
Returns the score of the document at given position. Please note that the score in this case is a distance, which means a score of 0 denotes the best possible hit. The result list starts with position 0 as everything in computer science does.

Specified by:
score in interface ImageSearchHits
Parameters:
position - defines the position
Returns:
the score of the document at given position. The lower the better (its a distance measure).

doc

public org.apache.lucene.document.Document doc(int position)
Returns the document at given position

Specified by:
doc in interface ImageSearchHits
Parameters:
position - defines the position.
Returns:
the document at given position.