org.apache.jackrabbit.core.query.lucene
Class ScoreNode

java.lang.Object
  extended by org.apache.jackrabbit.core.query.lucene.ScoreNode

public final class ScoreNode
extends Object

ScoreNode implements a simple container which holds a mapping of NodeId to a score value.


Constructor Summary
ScoreNode(NodeId id, float score)
          Creates a new ScoreNode.
ScoreNode(NodeId id, float score, int doc)
          Creates a new ScoreNode.
 
Method Summary
 int getDoc(org.apache.lucene.index.IndexReader reader)
          Returns the document number for this score node.
 NodeId getNodeId()
           
 float getScore()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScoreNode

public ScoreNode(NodeId id,
                 float score)
Creates a new ScoreNode.

Parameters:
id - the node id.
score - the score value.

ScoreNode

public ScoreNode(NodeId id,
                 float score,
                 int doc)
Creates a new ScoreNode.

Parameters:
id - the node id.
score - the score value.
doc - the document number.
Method Detail

getNodeId

public NodeId getNodeId()
Returns:
the node id for this ScoreNode.

getScore

public float getScore()
Returns:
the score for this ScoreNode.

getDoc

public int getDoc(org.apache.lucene.index.IndexReader reader)
           throws IOException
Returns the document number for this score node.

Parameters:
reader - the current index reader to look up the document if needed.
Returns:
the document number.
Throws:
IOException - if an error occurs while reading from the index or the node is not present in the index.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.