|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.egothor.core.query.Query
public abstract class Query
The Query class represents an inner form of a query or its subpart (AND, OR,
NOT, etc.), while the binary form is represented by Runner. If you
wish to define a new type of query you should extend this class.
| Field Summary | |
|---|---|
static int |
MODEL_BOOLEAN
Description of the Field |
static int |
MODEL_FUZZY_M
Description of the Field |
static int |
MODEL_VECTOR
Description of the Field |
| Constructor Summary | |
|---|---|
|
Query()
Constructor for the Query object |
protected |
Query(boolean req,
boolean proh)
Constructor for the Query object |
| Method Summary | |
|---|---|
void |
addTerms(java.util.HashSet<Token> to)
Add the given HashSet of terms to this Query. |
Query |
applyCWI(CWI cwi)
Return a new Query object with the given CWI applied. |
Runner |
attach(Rider r)
This method creates a binary form of this query. |
org.w3c.dom.Node |
explain(org.w3c.dom.Document doc)
Print out this query in an XML format. |
boolean |
getExcluded()
Gets the excluded attribute of the Query object |
int |
getModel()
Gets the model attribute of the Query object |
abstract java.lang.String |
getNodeName()
Return the name of this query in an XML format produced by explain(org.w3c.dom.Document). |
boolean |
getProhibited()
Gets the prohibited attribute of the Query object |
boolean |
getRequired()
Gets the required attribute of the Query object |
boolean |
getUnknown()
Gets the unknown attribute of the Query object |
boolean |
isRequiredOrProhibited()
Test whether this query (without subparts) used prohibited or required flags. |
void |
setExcluded(boolean excluded)
Sets the excluded attribute of the Query object |
void |
setModel(int model)
Sets the model attribute of the Query object |
void |
setProhibited()
Require the entire query to not be present in a document for it to be classified as a hit. |
void |
setRequired()
Require the entire query to be present in a document for it to be classified as a hit. |
void |
setUnknown(boolean unknown)
Sets the unknown attribute of the Query object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MODEL_VECTOR
public static final int MODEL_FUZZY_M
public static final int MODEL_BOOLEAN
| Constructor Detail |
|---|
public Query()
protected Query(boolean req,
boolean proh)
req - set to true if the entire query is required for a
hitproh - set to true if the entire query should not be in a
hit| Method Detail |
|---|
public void setExcluded(boolean excluded)
excluded - The new excluded valuepublic void setModel(int model)
model - The new model valuepublic void setProhibited()
public void setRequired()
public void setUnknown(boolean unknown)
unknown - The new unknown valuepublic boolean getExcluded()
public int getModel()
public abstract java.lang.String getNodeName()
explain(org.w3c.dom.Document).
public boolean getProhibited()
public boolean getRequired()
public boolean isRequiredOrProhibited()
public boolean getUnknown()
public org.w3c.dom.Node explain(org.w3c.dom.Document doc)
throws org.w3c.dom.DOMException
doc - Description of the Parameter
org.w3c.dom.DOMException - Description of the Exceptionpublic Runner attach(Rider r)
r - the Rider
public void addTerms(java.util.HashSet<Token> to)
to - a HashSet containing the terms to be addedpublic Query applyCWI(CWI cwi)
cwi - the CWI
this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||