org.egothor.query
Class QGroup

java.lang.Object
  extended by org.egothor.core.query.Query
      extended by org.egothor.query.QGroup

public class QGroup
extends Query

The QGroup object represents a group of clausulas.

Author:
Leo Galambos

Field Summary
 
Fields inherited from class org.egothor.core.query.Query
MODEL_BOOLEAN, MODEL_FUZZY_M, MODEL_VECTOR
 
Constructor Summary
QGroup()
          Constructor for the QGroup object.
QGroup(boolean required)
          Construct a QGroup with the given boolean value.
 
Method Summary
 void add(Query q)
          Add the given Query to the group.
 void addTerms(java.util.HashSet<Token> to)
          Add the given HashSet of terms.
 Query applyCWI(CWI cwi)
          Apply the given CWI to this Query.
 Runner attach(Rider r)
          Return a binary form of this object for the given Rider.
 org.w3c.dom.Node explain(org.w3c.dom.Document doc)
          Description of the Method
 java.lang.String getNodeName()
          Gets the nodeName attribute of the QGroup object
 void setModel(int model)
          Sets the model attribute of the QGroup object
 java.lang.String toString()
          Return a String representation of this object.
 
Methods inherited from class org.egothor.core.query.Query
getExcluded, getModel, getProhibited, getRequired, getUnknown, isRequiredOrProhibited, setExcluded, setProhibited, setRequired, setUnknown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QGroup

public QGroup()
Constructor for the QGroup object.


QGroup

public QGroup(boolean required)
Construct a QGroup with the given boolean value. Setting required to true means that the query terms must be contained in any document returned as a hit.

Parameters:
required - Description of the Parameter
Method Detail

setModel

public void setModel(int model)
Sets the model attribute of the QGroup object

Overrides:
setModel in class Query
Parameters:
model - The new model value

getNodeName

public java.lang.String getNodeName()
Gets the nodeName attribute of the QGroup object

Specified by:
getNodeName in class Query
Returns:
The nodeName value

explain

public org.w3c.dom.Node explain(org.w3c.dom.Document doc)
                         throws org.w3c.dom.DOMException
Description of the Method

Overrides:
explain in class Query
Parameters:
doc - Description of the Parameter
Returns:
Description of the Return Value
Throws:
org.w3c.dom.DOMException - Description of the Exception

add

public void add(Query q)
Add the given Query to the group.

Parameters:
q - the query to add

toString

public java.lang.String toString()
Return a String representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
a String

attach

public Runner attach(Rider r)
Return a binary form of this object for the given Rider.

Overrides:
attach in class Query
Parameters:
r - the Rider
Returns:
a Runner

addTerms

public void addTerms(java.util.HashSet<Token> to)
Add the given HashSet of terms.

Overrides:
addTerms in class Query
Parameters:
to - the HashSet containing the desired terms

applyCWI

public Query applyCWI(CWI cwi)
Apply the given CWI to this Query.

Overrides:
applyCWI in class Query
Parameters:
cwi - the desired CWI
Returns:
a Query. When the CWI is null, it simply returns this object.