org.apache.ws.resource.properties.query
Interface ExpressionEvaluator

All Known Implementing Classes:
AbstractXPathExpressionEvaluator

public interface ExpressionEvaluator

An ExpressionEvaluator is used to implement a query expression evaluation of a ResourcePropertySet. An evaluator can be registered with a QueryEngine, which in turn calls the evaluator when a matching expression is found.

See Also:
ResourcePropertySet, QueryEngine

Method Summary
 java.lang.Object evaluate(QueryExpression queryExpr, ResourcePropertySet resourcePropertySet, org.w3c.dom.Element nsContext)
          Evaluates the expression over a ResourcePropertySet and returns the result.
 java.net.URI[] getSupportedDialects()
          Gets the list of dialects that this evaluator can handle.
 

Method Detail

getSupportedDialects

public java.net.URI[] getSupportedDialects()
Gets the list of dialects that this evaluator can handle.

Returns:
list of dialects supported by this evaluator.

evaluate

public java.lang.Object evaluate(QueryExpression queryExpr,
                                 ResourcePropertySet resourcePropertySet,
                                 org.w3c.dom.Element nsContext)
                          throws UnknownQueryExpressionDialectException,
                                 QueryEvaluationErrorException,
                                 InvalidQueryExpressionException
Evaluates the expression over a ResourcePropertySet and returns the result.

Parameters:
queryExpr - object passed by client representing query expression.
resourcePropertySet - ResourcePropertySet associated with resource. The expression is evaluated against this set.
Returns:
the result of the evaluation which depends on the expression. The results must be an xml serializable object in order to be passed back correctly to a remote client. The easiest way of achieving this is to model it as a Bean, or simply return a SOAPElment or DOM Element. If the result object returned is null an empty query result is returned.
Throws:
UnknownQueryExpressionDialectException - if query dialect is unsupported
QueryEvaluationErrorException - if query evaluation fails
InvalidQueryExpressionException - if query expression is invalid


Copyright © 2004-2005 Apache Software Foundation. All Rights Reserved.