org.geotools.filter
Interface AttributeExpression

All Superinterfaces:
Expression, ExpressionType
All Known Implementing Classes:
AttributeExpressionImpl, AttributeExpressionImpl2

public interface AttributeExpression
extends Expression

The geotools representation of the PropertyName tag in an xml encoded filter.

It should handle xpath attributePaths of features, and should report the attribute found at the attributePath of a feature.

Version:
$Id: AttributeExpression.java 17702 2006-01-23 00:08:55Z desruisseaux $

Field Summary
 
Fields inherited from interface org.geotools.filter.ExpressionType
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_STRING, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Method Summary
 java.lang.String getAttributePath()
          Gets the attribute path of this expression.
 java.lang.Object getValue(Feature feature)
          Gets the attribute value at the path held by this expression from the feature.
 void setAttributePath(java.lang.String attributePath)
          Sets the path of the attribute of this expression.
 
Methods inherited from interface org.geotools.filter.Expression
accept, getType
 

Method Detail

setAttributePath

public void setAttributePath(java.lang.String attributePath)
                      throws IllegalFilterException
Sets the path of the attribute of this expression. For simple, non-nested, features the 'path' is simply the name of an attribute.

Parameters:
attributePath - A string of the path.
Throws:
IllegalFilterException - if the path is not valid.

getValue

public java.lang.Object getValue(Feature feature)
Gets the attribute value at the path held by this expression from the feature.

Specified by:
getValue in interface Expression
Parameters:
feature - the feature to get this attribute from.
Returns:
the value of the attribute found by this expression.

getAttributePath

public java.lang.String getAttributePath()
Gets the attribute path of this expression.

Returns:
the attribute to be queried.


Copyright © GeoTools. All Rights Reserved.