org.globus.wsrf.impl
Class XPathExpressionEvaluator
java.lang.Object
org.globus.wsrf.impl.XPathExpressionEvaluator
- All Implemented Interfaces:
- ExpressionEvaluator
public class XPathExpressionEvaluator
- extends java.lang.Object
- implements ExpressionEvaluator
Evaluator supporting XPath queries using Xalan-J XPathAPI.
The implementation creates resource property document on-fly and runs
the query against it.
|
Field Summary |
private static java.lang.String[] |
DIALECTS
|
private static org.globus.util.I18n |
i18n
|
(package private) static org.apache.commons.logging.Log |
logger
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
static org.apache.commons.logging.Log logger
i18n
private static org.globus.util.I18n i18n
DIALECTS
private static final java.lang.String[] DIALECTS
XPathExpressionEvaluator
public XPathExpressionEvaluator()
getDialects
public java.lang.String[] getDialects()
- Description copied from interface:
ExpressionEvaluator
- Gets the list of dialects that this evaluator can handle.
- Specified by:
getDialects in interface ExpressionEvaluator
- Returns:
- list of dialects supported by this evaluator.
evaluate
public java.lang.Object evaluate(QueryExpressionType expression,
ResourcePropertySet resourcePropertySet)
throws UnsupportedQueryDialectException,
QueryEvaluationException,
InvalidQueryExpressionException,
QueryException
- Description copied from interface:
ExpressionEvaluator
- Evaluates the expression over a ResourcePropertySet and returns the
result.
- Specified by:
evaluate in interface ExpressionEvaluator
- Parameters:
expression - 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:
UnsupportedQueryDialectException - if query dialect is
unsupported.
QueryEvaluationException - if query evaluation fails.
InvalidQueryExpressionException - if query expression is invalid.
QueryException - if any other error
evaluateQuery
private java.util.List evaluateQuery(QueryExpressionType expression,
ResourcePropertySet resourcePropertySet)
throws java.lang.Exception
- Throws:
java.lang.Exception