gov.nist.nlpir.irf.result
Class ResultForDocMatchingQueryCondition

java.lang.Object
  |
  +--gov.nist.nlpir.irf.result.ResultForDocMatchingQueryCondition

public class ResultForDocMatchingQueryCondition
extends java.lang.Object

The result of a search modelling the match between a document and a query condition - at the level of a feature (e.g., a keyword in a text document query)

Version:
$Revision: 1.2 $
Author:
This software was produced by NIST, an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification and maintenance.

Field Summary
private  java.util.Vector basicResults
          The collection of BasicRetrievalResults contributing to this result
private  double combinedScore
          A value reflecting some combination of the scores of features in the document which match features in the query
private  QueryCondition condition
          The query condition met by this result
private  ProxyDocument doc
          The document associated with this result
private  double weightOfFeatureInDocument
          The weight of a feature in the document.
private  double weightOfFeatureInQuery
          The weight of a feature in the query.
 
Constructor Summary
ResultForDocMatchingQueryCondition(QueryCondition condition, ProxyDocument doc, java.util.Vector basicResults)
          Creates a ResultForDocMatchingQueryCondition for the supplied query condition, document and results.
 
Method Summary
 java.util.Vector getBasicResults()
          Gets the basicResults.
 double getCombinedScore()
          Gets the combinedScore
 ProxyDocument getDocument()
          Gets the document.
 QueryCondition getQueryCondition()
          Gets the condition.
 double getWeightOfFeatureInDocument()
          Gets the weightOfFeatureInDocument.
 double getWeightOfFeatureInQuery()
          Gets the weightOfFeatureInQuery.
 void setBasicResults(java.util.Vector results)
          Sets the basicResults to the supplied value.
 void setCombinedScore(double idf)
          Sets the combinedScore to the supplied value.
 void setWeightOfFeatureInDocument(double w)
          Sets the weightOfFeatureInDocument to the supplied value.
 void setWeightOfFeatureInQuery(double w)
          Sets the weightOfFeatureInQuery to the supplied value.
 java.lang.String toString()
          Creates a string representation for a ResultForDocMatchingQueryCondition
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

condition

private QueryCondition condition
The query condition met by this result

doc

private ProxyDocument doc
The document associated with this result

combinedScore

private double combinedScore
A value reflecting some combination of the scores of features in the document which match features in the query

weightOfFeatureInDocument

private double weightOfFeatureInDocument
The weight of a feature in the document. This is usually derived as some function of the frequency of the feature in the document, e.g. the logarithm of the feature's frequency (see IdfIdxIntern.calcWeightOfFeatureInDocument())

weightOfFeatureInQuery

private double weightOfFeatureInQuery
The weight of a feature in the query. This is usually derived as some function of the frequency of the feature in the query, e.g. the logarithm of the feature's frequency (see IdfIdxIntern.calcWeightOfFeatureInQuery())

basicResults

private java.util.Vector basicResults
The collection of BasicRetrievalResults contributing to this result
Constructor Detail

ResultForDocMatchingQueryCondition

public ResultForDocMatchingQueryCondition(QueryCondition condition,
                                          ProxyDocument doc,
                                          java.util.Vector basicResults)
Creates a ResultForDocMatchingQueryCondition for the supplied query condition, document and results. WeightOfFeatureInDocument, WeightOfFeatureInQuery and combinedScore are initialized to 0.0.
Parameters:
c - A query condition.
d - A document.
results - results.
Method Detail

toString

public java.lang.String toString()
Creates a string representation for a ResultForDocMatchingQueryCondition
Returns:
The string representation.
Overrides:
toString in class java.lang.Object

setCombinedScore

public void setCombinedScore(double idf)
Sets the combinedScore to the supplied value.
Parameters:
idf - The new combinedScore.

getCombinedScore

public double getCombinedScore()
Gets the combinedScore
Returns:
the CombinedScore.

getQueryCondition

public QueryCondition getQueryCondition()
Gets the condition.
Returns:
The condition.

getDocument

public ProxyDocument getDocument()
Gets the document.
Returns:
The document.

setWeightOfFeatureInDocument

public void setWeightOfFeatureInDocument(double w)
Sets the weightOfFeatureInDocument to the supplied value.
Parameters:
w - The new weight of the feature in the document.

getWeightOfFeatureInDocument

public double getWeightOfFeatureInDocument()
Gets the weightOfFeatureInDocument.
Returns:
Weight of the feature in the document.

setWeightOfFeatureInQuery

public void setWeightOfFeatureInQuery(double w)
Sets the weightOfFeatureInQuery to the supplied value.
Parameters:
w - The new weight of the feature in the query.

getWeightOfFeatureInQuery

public double getWeightOfFeatureInQuery()
Gets the weightOfFeatureInQuery.
Returns:
Weight of the feature in the query.

getBasicResults

public java.util.Vector getBasicResults()
Gets the basicResults.
Returns:
Basic results.

setBasicResults

public void setBasicResults(java.util.Vector results)
Sets the basicResults to the supplied value.
Parameters:
results - the new basic result.