|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.gla.terrier.querying.parser.Query uk.ac.gla.terrier.querying.parser.FieldQuery
public class FieldQuery
Models a query qualified with a field.
Constructor Summary | |
---|---|
FieldQuery()
An empty default constructor |
|
FieldQuery(Query q)
Constructs a field query from the given query. |
|
FieldQuery(Query q,
java.lang.String f)
Constructs a field query from the given query and the given field. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Deep Clone this object |
java.lang.String |
getField()
Gets the field that the query term should appear. |
void |
getTermsOf(java.lang.Class c,
java.util.ArrayList alist,
boolean req)
Returns all the query terms, in subqueries that are instances of a given class |
boolean |
obtainControls(java.util.HashSet allowed,
java.util.Hashtable controls)
Checks to see if field name is a valid control name, as specified by allowed, and if so adds it to the controls table and returns true to specify that this Query object is now dead. |
void |
obtainQueryTerms(MatchingQueryTerms terms)
Prepares the query for matching by transforming the query objects to a set of query terms. |
void |
obtainQueryTerms(MatchingQueryTerms terms,
boolean required)
Prepares the query for matching by transforming the query objects to a set of query terms. |
void |
setField(java.lang.String f)
Sets the value of the field. |
java.lang.String |
toString()
Returns a string representation of the query. |
Methods inherited from class uk.ac.gla.terrier.querying.parser.Query |
---|
applyTermPipeline, obtainAllOf, setChild |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FieldQuery()
public FieldQuery(Query q)
q
- the query that is qualified with the field operator.public FieldQuery(Query q, java.lang.String f)
q
- Query the query that is qualified with the field operator.f
- String the field in which the given query should appear in.Method Detail |
---|
public java.lang.Object clone()
clone
in class Query
public java.lang.String getField()
public void setField(java.lang.String f)
f
- String the value of the field.public java.lang.String toString()
toString
in class Query
public void obtainQueryTerms(MatchingQueryTerms terms)
obtainQueryTerms
in class Query
terms
- MatchingQueryTerms the object which holds the
query terms and their modifiers.public void obtainQueryTerms(MatchingQueryTerms terms, boolean required)
obtainQueryTerms
in class Query
terms
- MatchingQueryTerms the object which holds the
query terms and their modifiers.required
- boolean indicates whether the field query
is required or not.public boolean obtainControls(java.util.HashSet allowed, java.util.Hashtable controls)
obtainControls
in class Query
allowed
- A hashset of lowercase control names that may be set by user queries.controls
- The hashtable to add the found controls to
public void getTermsOf(java.lang.Class c, java.util.ArrayList 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.
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |