org.terrier.querying.parser
Class DisjunctiveQuery

java.lang.Object
  extended by org.terrier.querying.parser.Query
      extended by org.terrier.querying.parser.MultiTermQuery
          extended by org.terrier.querying.parser.DisjunctiveQuery
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class DisjunctiveQuery
extends MultiTermQuery

Models a disjunctive choice in single term queries in a query.

Author:
Craig Macdonald
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.terrier.querying.parser.Query
Query.ForEachQueryNode
 
Field Summary
 
Fields inherited from class org.terrier.querying.parser.MultiTermQuery
prefix, suffix, v
 
Fields inherited from class org.terrier.querying.parser.Query
child, tmpSTQ
 
Constructor Summary
DisjunctiveQuery()
          default constructor
DisjunctiveQuery(java.lang.String[] alternatives)
          Constructor
 
Method Summary
 double getWeight()
          Returns the weight of the disjunctive "term".
 void obtainAllOf(java.lang.Class<? extends Query> c, java.util.List<Query> a)
          Returns all the queries of the specified class
 void obtainQueryTerms(MatchingQueryTerms terms)
          Prepares the query for matching by transforming the query objects to a set of query terms.
 void resetActive()
          reset active index
 void setActive(int _activeIndex)
          set active index
 void setWeight(double w)
          Sets the weight of the disjunctive "term".
 
Methods inherited from class org.terrier.querying.parser.MultiTermQuery
add, add, apply, applyTermPipeline, clone, getNumberOfTerms, getTerms, getTermsOf, obtainControls, obtainQueryTerms, parseTree, replace, toString
 
Methods inherited from class org.terrier.querying.parser.Query
setChild
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisjunctiveQuery

public DisjunctiveQuery(java.lang.String[] alternatives)
Constructor

Parameters:
alternatives -

DisjunctiveQuery

public DisjunctiveQuery()
default constructor

Method Detail

setWeight

public void setWeight(double w)
Sets the weight of the disjunctive "term".

Parameters:
w - double the weight of the disjunctive "term".

getWeight

public double getWeight()
Returns the weight of the disjunctive "term".

Returns:
double the weight of the disjunctive "term".

resetActive

public void resetActive()
reset active index


setActive

public void setActive(int _activeIndex)
set active index

Parameters:
_activeIndex -

obtainAllOf

public void obtainAllOf(java.lang.Class<? extends Query> c,
                        java.util.List<Query> a)
Description copied from class: Query
Returns all the queries of the specified class

Overrides:
obtainAllOf in class MultiTermQuery

obtainQueryTerms

public void obtainQueryTerms(MatchingQueryTerms terms)
Description copied from class: MultiTermQuery
Prepares the query for matching by transforming the query objects to a set of query terms.

Overrides:
obtainQueryTerms in class MultiTermQuery
Parameters:
terms - MatchingQueryTerms the object which holds the query terms and their modifiers.


Terrier 3.5. Copyright © 2004-2011 University of Glasgow