incubator.net.xoetrope.xui
Class XPathEvaluator
java.lang.Object
incubator.net.xoetrope.xui.XPathEvaluator
-
public class XPathEvaluator
- extends java.lang.Object
-
A class used by XPage to implement its evaluation of paths
Copyright (c) Xoetrope Ltd., 2002-2004
License: see license.txt
$Revision: 1.2 $
Method Summary |
java.lang.Object |
evaluateAttribute(java.lang.String attribValue)
Evaluates an attribute value. |
java.lang.String |
evaluatePath(java.lang.String path)
Evaluates a path (potentially) containing a method call |
java.lang.String |
stripAttributeValues(java.lang.String path)
Remove the attribute paths from a path e.g. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
evaluator
protected XDefaultAttributeEvaluator evaluator
-
The default attribute expression evaluator
ownerPage
protected PageSupport ownerPage
-
The enclosing context
currentProject
protected XProject currentProject
-
The project to which this object belongs
XPathEvaluator
public XPathEvaluator(XProject project,
PageSupport page)
-
Creates a new instance of XPathEvaluator
- Parameters:
project
- the owner project
page
- the enclosing context
evaluateAttribute
public java.lang.Object evaluateAttribute(java.lang.String attribValue)
-
Evaluates an attribute value. An attribute may be a value or a method call. If brackets are part of the value it is assumed that a method call is intended. The method call is indicated by the '$' symbol e.g. ${myMethod()}
-
- Parameters:
attribValue
- the raw attribute value
- Returns:
- the evaluated attribute
evaluatePath
public java.lang.String evaluatePath(java.lang.String path)
-
Evaluates a path (potentially) containing a method call
-
- Parameters:
path
- the raw path
- Returns:
- the evaluated path
stripAttributeValues
public java.lang.String stripAttributeValues(java.lang.String path)
-
Remove the attribute paths from a path e.g. remove @value=ignore
-
- Parameters:
path
- the path to strip
- Returns:
- the stripped path