org.geotools.filter
Interface MathExpression

All Superinterfaces:
org.opengis.filter.expression.BinaryExpression, org.opengis.filter.expression.Expression, ExpressionType
All Known Implementing Classes:
AddImpl, DivideImpl, MathExpressionImpl, MultiplyImpl, SubtractImpl

Deprecated. use BinaryExpression

public interface MathExpression
extends Expression, org.opengis.filter.expression.BinaryExpression

Holds a mathematical relationship between two expressions. Note that the sub expressions must be math expressions. In other words, they must be a math literal, another math expression, or a feature attribute with a declared math type. You may create math expressions of arbitrary complexity by nesting other math expressions as sub expressions in one or more math expressions. This filter defines left and right values to clarify the sub expression precedence for non-associative operations, such as subtraction and division. For example, the left value is the numerator and the right is the denominator in an ExpressionMath division operation.

Version:
$Id: MathExpression.java 30642 2008-06-12 17:52:06Z acuster $
Author:
Rob Hranac, Vision for New York

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_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT
 
Fields inherited from interface org.opengis.filter.expression.Expression
NIL
 
Method Summary
 void addLeftValue(Expression leftValue)
          Deprecated. use BinaryExpression#setExpression1(Expression)
 void addRightValue(Expression rightValue)
          Deprecated. use BinaryExpression#setExpression2(Expression)
 Expression getLeftValue()
          Deprecated. use BinaryExpression.getExpression1().
 Expression getRightValue()
          Deprecated. use BinaryExpression.getExpression2().
 short getType()
          Deprecated. The expression type system has been replaced by an actual class type system.
 java.lang.Object getValue(org.opengis.feature.simple.SimpleFeature feature)
          Deprecated. use Expression#evaluate(Feature).
 
Methods inherited from interface org.geotools.filter.Expression
accept, evaluate
 
Methods inherited from interface org.opengis.filter.expression.BinaryExpression
getExpression1, getExpression2
 
Methods inherited from interface org.opengis.filter.expression.Expression
accept, evaluate, evaluate
 

Method Detail

getValue

java.lang.Object getValue(org.opengis.feature.simple.SimpleFeature feature)
Deprecated. use Expression#evaluate(Feature).

Returns the value for this expression.

Parameters:
feature - Feature to use when return sub expression values.
Returns:
Value of this expression.

addRightValue

void addRightValue(Expression rightValue)
                   throws IllegalFilterException
Deprecated. use BinaryExpression#setExpression2(Expression)

Adds the 'right' value to this expression.

Parameters:
rightValue - Expression to add to this expression.
Throws:
IllegalFilterException - Attempting to add non-math expression.

getType

short getType()
Deprecated. The expression type system has been replaced by an actual class type system.

Gets the type of this expression.

Returns:
Expression type.

getLeftValue

Expression getLeftValue()
Deprecated. use BinaryExpression.getExpression1().

Gets the left expression.

Returns:
the expression on the left of the comparison.

getRightValue

Expression getRightValue()
Deprecated. use BinaryExpression.getExpression2().

Gets the right expression.

Returns:
the expression on the right of the comparison.

addLeftValue

void addLeftValue(Expression leftValue)
                  throws IllegalFilterException
Deprecated. use BinaryExpression#setExpression1(Expression)

Adds the 'left' value to this expression.

Parameters:
leftValue - Expression to add to this expression.
Throws:
IllegalFilterException - Attempting to add non-math expression.


Copyright © 1996-2010 Geotools. All Rights Reserved.