SMILA (incubation) API documentation

org.eclipse.smila.search.lucene.messages.advsearch
Class DQueryExpression

java.lang.Object
  extended by org.eclipse.smila.search.lucene.messages.advsearch.DQueryExpression
All Implemented Interfaces:
java.lang.Cloneable, IQueryExpression

public class DQueryExpression
extends java.lang.Object
implements IQueryExpression

Author:
gschmidt

Constructor Summary
DQueryExpression()
          Constructs a new QueryExpression.
DQueryExpression(java.lang.String indexName, int maxHits)
          Constructs a new QueryExpression.
 
Method Summary
 java.lang.Object clone()
          Creates a new instance of QueryExpression with the exact same properties as the current instance.
 boolean equals(java.lang.Object obj)
          Calls the toString() method on the given Object and THIS instance and then compares the resulting Strings with the equals() method.
 java.lang.String getIndexName()
          Returns the name of the index that will be used for this QueryExpression.
 int getMaxHits()
          Returns the maximum number of hits in the search result.
 int getMinSimilarity()
          Returns the minimum similarity score for matches in this QueryExpression.
 boolean getShowHitDistribution()
           
 java.lang.Integer getStartHits()
           
 ITerm getTerm()
          Returns the term below this QueryExpression.
 void setIndexName(java.lang.String indexName)
          Sets the name of the index that will be used for this QueryExpression.
 void setMaxHits(int maxHits)
          Sets the maximum number of hits to be retrieved by the search.
 void setMinSimilarity(int minSimilarity)
          Sets the minimum similarity score for matches in this QueryExpression.
 void setShowHitDistribution(boolean showHitDistribution)
           
 void setStartHits(java.lang.Integer startHits)
           
 ITerm setTerm(ITerm term)
          Sets the term below this QueryExpression.
 java.lang.String toString()
          Returns this instance's contents as an XML String.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DQueryExpression

public DQueryExpression(java.lang.String indexName,
                        int maxHits)
Constructs a new QueryExpression.

Parameters:
indexName - name of the index to use with this query
maxHits - maximum number of hits to be retrieved

DQueryExpression

public DQueryExpression()
Constructs a new QueryExpression.

Method Detail

clone

public java.lang.Object clone()
Creates a new instance of QueryExpression with the exact same properties as the current instance.

Overrides:
clone in class java.lang.Object
Returns:
Object

getMaxHits

public int getMaxHits()
Returns the maximum number of hits in the search result.

Specified by:
getMaxHits in interface IQueryExpression
Returns:
maximum number of hits.

setMaxHits

public void setMaxHits(int maxHits)
Sets the maximum number of hits to be retrieved by the search.

Specified by:
setMaxHits in interface IQueryExpression
Parameters:
maxHits - maximum number of hits that will be included in the search result.

getIndexName

public java.lang.String getIndexName()
Returns the name of the index that will be used for this QueryExpression.

Specified by:
getIndexName in interface IQueryExpression
Returns:
name of the index.

setIndexName

public void setIndexName(java.lang.String indexName)
Sets the name of the index that will be used for this QueryExpression.

Specified by:
setIndexName in interface IQueryExpression
Parameters:
indexName - of the index.

setShowHitDistribution

public void setShowHitDistribution(boolean showHitDistribution)
Specified by:
setShowHitDistribution in interface IQueryExpression

getShowHitDistribution

public boolean getShowHitDistribution()
Specified by:
getShowHitDistribution in interface IQueryExpression

getTerm

public ITerm getTerm()
Returns the term below this QueryExpression.

Specified by:
getTerm in interface IQueryExpression
Returns:
contents of the term field.

setTerm

public ITerm setTerm(ITerm term)
Sets the term below this QueryExpression. Each QueryExpression must have exactly one term.

Specified by:
setTerm in interface IQueryExpression
Parameters:
term - -
Returns:
contents of this QueryExpression's term field.

getMinSimilarity

public int getMinSimilarity()
Returns the minimum similarity score for matches in this QueryExpression.

Specified by:
getMinSimilarity in interface IQueryExpression
Returns:
minimum similarity

setMinSimilarity

public void setMinSimilarity(int minSimilarity)
Sets the minimum similarity score for matches in this QueryExpression.

Specified by:
setMinSimilarity in interface IQueryExpression
Parameters:
minSimilarity - similarity to be set for this QueryExpression.

toString

public java.lang.String toString()
Returns this instance's contents as an XML String.

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

equals

public boolean equals(java.lang.Object obj)
Calls the toString() method on the given Object and THIS instance and then compares the resulting Strings with the equals() method.

Overrides:
equals in class java.lang.Object
Parameters:
obj - -
Returns:
boolean -

getStartHits

public java.lang.Integer getStartHits()
Specified by:
getStartHits in interface IQueryExpression

setStartHits

public void setStartHits(java.lang.Integer startHits)
Specified by:
setStartHits in interface IQueryExpression

SMILA (incubation) API documentation