org.deegree.filter
Class OperatorFilter

java.lang.Object
  extended by org.deegree.filter.OperatorFilter
All Implemented Interfaces:
Filter

public class OperatorFilter
extends Object
implements Filter

Filter that selects objects that test positively against Operator-based expressions.

Version:
$Revision:$, $Date:$
Author:
Markus Schneider , last edited by: $Author:$

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.filter.Filter
Filter.Type
 
Constructor Summary
OperatorFilter(Operator rootOperator)
          Creates a new OperatorFilter.
 
Method Summary
<T> boolean
evaluate(T obj, XPathEvaluator<T> xpathEvaluator)
          Determines if the given object matches this Filter.
 Operator getOperator()
          Returns the root Operator of the test expression.
 Filter.Type getType()
          Always returns Filter.Type.OPERATOR_FILTER (for OperatorFilter instances).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OperatorFilter

public OperatorFilter(Operator rootOperator)
Creates a new OperatorFilter.

Parameters:
rootOperator - root operator that defines the test expression
Method Detail

getType

public Filter.Type getType()
Always returns Filter.Type.OPERATOR_FILTER (for OperatorFilter instances).

Specified by:
getType in interface Filter
Returns:
Filter.Type.OPERATOR_FILTER

getOperator

public Operator getOperator()
Returns the root Operator of the test expression.

Returns:
the root operator

evaluate

public <T> boolean evaluate(T obj,
                            XPathEvaluator<T> xpathEvaluator)
                 throws FilterEvaluationException
Description copied from interface: Filter
Determines if the given object matches this Filter.

Specified by:
evaluate in interface Filter
Type Parameters:
T - type of the context object
Parameters:
obj - object that the operator is evaluated upon, must not be null
xpathEvaluator - used for evaluation of XPath expressions, must not be null
Returns:
true, if the operator evaluates to true, false otherwise
Throws:
FilterEvaluationException - if the evaluation fails

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.