org.apache.slide.search.basic.expression
Class MergeExpression

java.lang.Object
  extended byorg.apache.slide.search.basic.expression.BasicExpression
      extended byorg.apache.slide.search.basic.expression.GenericBasicExpression
          extended byorg.apache.slide.search.basic.expression.MergeExpression
All Implemented Interfaces:
IBasicExpression
Direct Known Subclasses:
AndExpression, OrExpression

public abstract class MergeExpression
extends GenericBasicExpression

Abstract base class for merge expressions (AND, OR).

Version:
$Revision: 1.6 $

Field Summary
 
Fields inherited from class org.apache.slide.search.basic.expression.BasicExpression
expressionElement, expressionFactory, resultSet
 
Constructor Summary
(package private) MergeExpression(org.jdom.Element e, java.util.Collection expressionsToMerge)
          Creates a merge expression according to Element e
 
Method Summary
 IBasicResultSet execute()
          Executes the expression.
protected abstract  void merge(IBasicResultSet set)
          Merges the given set into the result Set of this expression.
protected  java.lang.String toString(java.lang.String op)
          String representation for debugging purposes.
 
Methods inherited from class org.apache.slide.search.basic.expression.BasicExpression
getFactory, setFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeExpression

MergeExpression(org.jdom.Element e,
                java.util.Collection expressionsToMerge)
          throws InvalidQueryException
Creates a merge expression according to Element e

Parameters:
e - jdom element, that describes the expression
expressionsToMerge - a Collection of IBasicExpressions to merge.
Method Detail

execute

public IBasicResultSet execute()
                        throws SearchException
Executes the expression.

Returns:
a Set of RequestedResource objects
Throws:
SearchException

merge

protected abstract void merge(IBasicResultSet set)
Merges the given set into the result Set of this expression.

Parameters:
set - the Set to merge.

toString

protected java.lang.String toString(java.lang.String op)
String representation for debugging purposes.

Returns:
this expression as String