gov.nist.nlpir.irf.query
Class QueryCondition

java.lang.Object
  |
  +--gov.nist.nlpir.irf.query.QueryCondition

public class QueryCondition
extends java.lang.Object

Holds information on a query condition, i.e. a particular aspect of a query. This information includes the query feature itself, the number of times the feature occurs in the query, the way(s) in which the feature is to be evaluated against the document index and the query document in which the query feature occurs.

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  DataElem feature
          The query feature (e.g.
private  int freqOfFeatureInQuery
          The frequency of the query feature in the query.
private  int maxFreqOfAnyFeatureInQuery
          The maximum frequency of any feature in the query.
private  QueryModalityUnit QMU
          The QueryModalityUnit which describes the actions to be performed regarding this query condition.
private  ProxyDocument queryDoc
          The document containing the query from which this query condition is derived.
private  DataElem queryDocAttr
          The query document attribute.
 
Constructor Summary
QueryCondition(ProxyDocument q, DataElem a, DataElem f, QueryModalityUnit unit, int freq, int maxf)
          Creates a QueryCondition for the supplied query, query document type, feature, and QueryModalityUnit.
QueryCondition(QueryModalityUnit unit)
          Creates a QueryCondition for the QueryModalityUnit and initializes freqOfFeatureInQuery and maxFreqOfAnyFeatureInQuery to 1.
 
Method Summary
 DataElem getFeature()
          Gets the query feature.
 int getFreqOfFeatureInQuery()
          Gets the frequency of the feature in the query.
 int getMaxFreqOfAnyFeatureInQuery()
          Gets the maximum frequency of any feature in the query.
 ProxyDocument getQueryDoc()
          Gets the query document.
 DataElem getQueryDocAttr()
          Gets the query document attribute.
 QueryModalityUnit getQueryModalityUnit()
          Gets the Query Modality Unit of the QueryCondition.
 void setFeature(DataElem f)
          Sets the query feature.
 void setFreqOfFeatureInQuery(int f)
          Sets the frequency of the feature in the query.
 void setMaxFreqOfAnyFeatureInQuery(int f)
          Sets the maximum frequency of any feature in the query.
 void setQueryDoc(ProxyDocument q)
          Sets the query document.
 void setQueryDocAttr(DataElem a)
          Sets QueryDocAttr to a.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

queryDoc

private ProxyDocument queryDoc
The document containing the query from which this query condition is derived.

queryDocAttr

private DataElem queryDocAttr
The query document attribute.

feature

private DataElem feature
The query feature (e.g. a query term such as a word in a text-based retrieval system).

QMU

private QueryModalityUnit QMU
The QueryModalityUnit which describes the actions to be performed regarding this query condition.

freqOfFeatureInQuery

private int freqOfFeatureInQuery
The frequency of the query feature in the query.

maxFreqOfAnyFeatureInQuery

private int maxFreqOfAnyFeatureInQuery
The maximum frequency of any feature in the query.
Constructor Detail

QueryCondition

public QueryCondition(QueryModalityUnit unit)
Creates a QueryCondition for the QueryModalityUnit and initializes freqOfFeatureInQuery and maxFreqOfAnyFeatureInQuery to 1.
Parameters:
unit - A QueryModalityUnit.

QueryCondition

public QueryCondition(ProxyDocument q,
                      DataElem a,
                      DataElem f,
                      QueryModalityUnit unit,
                      int freq,
                      int maxf)
Creates a QueryCondition for the supplied query, query document type, feature, and QueryModalityUnit. In addition freqOfFeatureInQuery is initialized to freq and maxFreqOfAnyFeatureInQuery is initialized to maxf
Parameters:
q - Query document.
a - Query document attribute.
f - A feature.
unit - A QueryModalityUnit.
freq - Frequency of feature in query.
maxf - Maximum frequency of any feature in query.
Method Detail

setQueryDoc

public void setQueryDoc(ProxyDocument q)
Sets the query document.
Parameters:
q - Query document.

getQueryDoc

public ProxyDocument getQueryDoc()
Gets the query document.
Returns:
The document.

setQueryDocAttr

public void setQueryDocAttr(DataElem a)
Sets QueryDocAttr to a.
Parameters:
a - Query document attribute.

getQueryDocAttr

public DataElem getQueryDocAttr()
Gets the query document attribute.
Returns:
The attribute.

setFeature

public void setFeature(DataElem f)
Sets the query feature.
Parameters:
f - a feature.

getFeature

public DataElem getFeature()
Gets the query feature.
Returns:
feature

getQueryModalityUnit

public QueryModalityUnit getQueryModalityUnit()
Gets the Query Modality Unit of the QueryCondition.
Returns:
The Query Modality Unit.

getFreqOfFeatureInQuery

public int getFreqOfFeatureInQuery()
Gets the frequency of the feature in the query.
Returns:
The frequency.

setFreqOfFeatureInQuery

public void setFreqOfFeatureInQuery(int f)
Sets the frequency of the feature in the query.
Parameters:
f - Frequency of feature in query.

getMaxFreqOfAnyFeatureInQuery

public int getMaxFreqOfAnyFeatureInQuery()
Gets the maximum frequency of any feature in the query.
Returns:
This maximum frequency.

setMaxFreqOfAnyFeatureInQuery

public void setMaxFreqOfAnyFeatureInQuery(int f)
Sets the maximum frequency of any feature in the query.
Parameters:
f - Maximum frequency of any feature in query.