|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.querying.parser.Query org.terrier.querying.parser.RequirementQuery
public class RequirementQuery
Models a query where the query terms have been qualified with a requirement operator, either plus, or minus.
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.Query |
---|
child, tmpSTQ |
Constructor Summary | |
---|---|
RequirementQuery()
An empty default constructor. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Deep copy this Query object |
boolean |
getRequired()
Returns True if the subquery is REQUIRED to exist, or false if it REQUIRED to NOT exit. |
void |
getTermsOf(java.lang.Class<? extends Query> c,
java.util.List<Query> alist,
boolean req)
Returns all the query terms, in subqueries that are instances of a given class. |
boolean |
obtainControls(java.util.Set<java.lang.String> allowed,
java.util.Map<java.lang.String,java.lang.String> controls)
This object cannot contain any controls, so this method will always return false. |
void |
obtainQueryTerms(MatchingQueryTerms terms)
Stores the terms of the query in the given structure, which is used for matching documents to the query. |
java.lang.String |
parseTree()
Returns the parse tree for the query as a string |
void |
setRequired(boolean needed)
Sets whether the query is required or not. |
java.lang.String |
toString()
Returns a string representation of the query. |
Methods inherited from class org.terrier.querying.parser.Query |
---|
apply, applyTermPipeline, getTerms, obtainAllOf, obtainQueryTerms, setChild |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RequirementQuery()
Method Detail |
---|
public java.lang.Object clone()
clone
in class Query
public void setRequired(boolean needed)
needed
- boolean indicates whether the query is required or not.public boolean getRequired()
public java.lang.String toString()
toString
in class Query
public void obtainQueryTerms(MatchingQueryTerms terms)
obtainQueryTerms
in class Query
terms
- MatchingQueryTerms the structure that holds the query
terms for matching to documents.public boolean obtainControls(java.util.Set<java.lang.String> allowed, java.util.Map<java.lang.String,java.lang.String> controls)
obtainControls
in class Query
public void getTermsOf(java.lang.Class<? extends Query> c, java.util.List<Query> alist, boolean req)
getTermsOf
in class Query
c
- Class a class of queries.alist
- ArrayList the list of query terms.req
- boolean indicates whether the subqueries
are required or not.public java.lang.String parseTree()
Query
parseTree
in class Query
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |