org.apache.camel.builder.xpath
Class ExchangeXPathExpression<E extends Exchange>

java.lang.Object
  extended by org.apache.camel.builder.xpath.ExchangeXPathExpression<E>
All Implemented Interfaces:
Expression<E>, Predicate<E>

public class ExchangeXPathExpression<E extends Exchange>
extends Object
implements Expression<E>, Predicate<E>

An Expression which uses XPath to perform the evaluation

Version:
$Revision: 521180 $

Constructor Summary
ExchangeXPathExpression(XPathBuilder builder, XPathExpression expression, MessageVariableResolver variableResolver)
           
 
Method Summary
 Object evaluate(E exchange)
          Returns the value of the expression on the given exchange
protected  Object evaluateAs(E exchange, QName resultType)
          Evaluates the expression as the given result type
protected  Object getDocument(E exchange)
          Strategy method to extract the document from the exchange
 Class getDocumentType()
           
 String getText()
           
 MessageVariableResolver getVariableResolver()
           
 boolean matches(E exchange)
          Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExchangeXPathExpression

public ExchangeXPathExpression(XPathBuilder builder,
                               XPathExpression expression,
                               MessageVariableResolver variableResolver)
Method Detail

matches

public boolean matches(E exchange)
Description copied from interface: Predicate
Evaluates the predicate on the message exchange and returns true if this exchange matches the predicate

Specified by:
matches in interface Predicate<E extends Exchange>
Parameters:
exchange - the message exchange
Returns:
true if the predicate matches

evaluate

public Object evaluate(E exchange)
Description copied from interface: Expression
Returns the value of the expression on the given exchange

Specified by:
evaluate in interface Expression<E extends Exchange>
Parameters:
exchange - the message exchange on which to evaluate the expression
Returns:
the value of the expression

getDocumentType

public Class getDocumentType()

getText

public String getText()

getVariableResolver

public MessageVariableResolver getVariableResolver()

evaluateAs

protected Object evaluateAs(E exchange,
                            QName resultType)
Evaluates the expression as the given result type


getDocument

protected Object getDocument(E exchange)
Strategy method to extract the document from the exchange



Copyright © 2007 Apache Software Foundation. All Rights Reserved.