|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 null
nsContext
- binding of the namespaces used in the XPath expression, may be null
IllegalArgumentException
public 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()
null
public QName getAsQName()
null
if the property name is not simplepublic NamespaceBindings getNsContext()
null
public Expression.Type getType()
Expression
Expression
.
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 Expression
T
- type of the context objectobj
- object that the expression is evaluated upon, must not be null
xpathEvaluator
- used for evaluation of XPath expressions, must not be null
null
values), but never
null
FilterEvaluationException
public String toString()
toString
in class Object
public String toString(String indent)
toString
in interface Expression
public Expression[] getParams()
Expression
getParams
in interface Expression
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |