org.apache.commons.jelly.expression.xpath
Class XPathExpression

java.lang.Object
  extended by org.apache.commons.jelly.expression.ExpressionSupport
      extended by org.apache.commons.jelly.expression.xpath.XPathExpression
All Implemented Interfaces:
Expression, org.jaxen.VariableContext

public class XPathExpression
extends ExpressionSupport
implements org.jaxen.VariableContext

An expression which returns an XPath object.

Version:
$Revision: 1807798 $
Author:
James Strachan

Field Summary
private  JellyContext context
           
private  org.apache.commons.logging.Log log
          The Log to which logging calls will be made.
private  java.lang.String text
           
private  java.util.Map uris
           
private  Expression xpathExpr
           
 
Fields inherited from class org.apache.commons.jelly.expression.ExpressionSupport
EMPTY_ITERATOR
 
Constructor Summary
XPathExpression()
           
XPathExpression(java.lang.String text, Expression xpathExpr, TagScript tagScript)
           
 
Method Summary
protected  java.util.Map createUriMap(java.util.Map namespaceContext)
          Factory method to create a synchronized Map of non-null and non-blank namespace prefixes to namespace URIs
 java.lang.Object evaluate(JellyContext context)
          Evaluates the expression with the given context and returns the result
 java.lang.String getExpressionText()
           
 java.lang.Object getVariableValue(java.lang.String namespaceURI, java.lang.String prefix, java.lang.String localName)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.commons.jelly.expression.ExpressionSupport
evaluateAsBoolean, evaluateAsIterator, evaluateAsString, evaluateRecurse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private org.apache.commons.logging.Log log
The Log to which logging calls will be made.


text

private java.lang.String text

xpathExpr

private Expression xpathExpr

context

private JellyContext context

uris

private java.util.Map uris
Constructor Detail

XPathExpression

public XPathExpression()

XPathExpression

public XPathExpression(java.lang.String text,
                       Expression xpathExpr,
                       TagScript tagScript)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getExpressionText

public java.lang.String getExpressionText()
Specified by:
getExpressionText in interface Expression
Returns:
the textual representation of this expression

evaluate

public java.lang.Object evaluate(JellyContext context)
Description copied from interface: Expression
Evaluates the expression with the given context and returns the result

Specified by:
evaluate in interface Expression

getVariableValue

public java.lang.Object getVariableValue(java.lang.String namespaceURI,
                                         java.lang.String prefix,
                                         java.lang.String localName)
Specified by:
getVariableValue in interface org.jaxen.VariableContext

createUriMap

protected java.util.Map createUriMap(java.util.Map namespaceContext)
Factory method to create a synchronized Map of non-null and non-blank namespace prefixes to namespace URIs