|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.filter.expression.ValueReference
public class ValueReference
Expression that contains an XPath 1.0 expression, a simple property name or an arbitrary identifier. Before
Filter Encoding 2.0.0, this kind of expression was known as PropertyName.
Depending on the content, the targeted property can be accessed as follows:
getAsText(). This method always return not null.getAsXPath() returns not null.getAsQName() returns not null.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.deegree.filter.Expression |
|---|
Expression.Type |
| Constructor Summary | |
|---|---|
ValueReference(QName name)
Creates a new ValueReference instance that selects a property. |
|
ValueReference(String text,
org.jaxen.NamespaceContext nsContext)
Creates a new ValueReference instance from an encoded XPath-expression and the namespace bindings. |
|
| Method Summary | ||
|---|---|---|
boolean |
equals(Object other)
|
|
|
evaluate(T obj,
XPathEvaluator<T> xpathEvaluator)
Determines the values of the expression for the given context object. |
|
QName |
getAsQName()
If the property name is simple, the element name is returned. |
|
String |
getAsText()
Returns the property name value (an XPath-expression). |
|
org.jaxen.expr.Expr |
getAsXPath()
Returns the Jaxen representation of the XPath expression, which provides access to the syntax tree. |
|
NamespaceBindings |
getNsContext()
Returns the bindings for the namespaces used in the XPath expression. |
|
Expression[] |
getParams()
Returns the expression's paramters. |
|
Expression.Type |
getType()
Returns the type of expression. |
|
int |
hashCode()
|
|
void |
set(String text,
org.jaxen.NamespaceContext nsContext)
|
|
String |
toString()
|
|
String |
toString(String indent)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ValueReference(String text,
org.jaxen.NamespaceContext nsContext)
throws IllegalArgumentException
ValueReference instance from an encoded XPath-expression and the namespace bindings.
text - must be a valid XPath 1.0-expression, must not be nullnsContext - binding of the namespaces used in the XPath expression, may be null
IllegalArgumentExceptionpublic ValueReference(QName name)
ValueReference instance that selects a property.
name - qualified name of the property, never null| Method Detail |
|---|
public void set(String text,
org.jaxen.NamespaceContext nsContext)
public org.jaxen.expr.Expr getAsXPath()
null if the property name is not an XPath expressionpublic String getAsText()
nullpublic QName getAsQName()
null if the property name is not simplepublic NamespaceBindings getNsContext()
nullpublic Expression.Type getType()
ExpressionExpression.
getType in interface Expression
public <T> TypedObjectNode[] evaluate(T obj,
XPathEvaluator<T> xpathEvaluator)
throws FilterEvaluationException
Expression
Note that this returns an TypedObjectNode[], as an expression may evaluate to multiple values, e.g.
a ValueReference that targets a multi property of a feature.
evaluate in interface ExpressionT - type of the context objectobj - object that the expression is evaluated upon, must not be nullxpathEvaluator - used for evaluation of XPath expressions, must not be null
null values), but never
null
FilterEvaluationExceptionpublic String toString()
toString in class Objectpublic String toString(String indent)
toString in interface Expressionpublic Expression[] getParams()
Expression
getParams in interface Expressionpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||