org.geotools.filter.expression
Interface MathExpression

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

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 18021 2006-02-14 20:36:18Z jdeolive $
Author:
Rob Hranac, Vision for New York

Field Summary
 
Fields inherited from interface org.geotools.filter.expression.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
 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(Feature feature)
          Deprecated. use Expression.evaluate(Feature).
 
Methods inherited from interface org.geotools.filter.expression.Expression
accept, evaluate
 
Methods inherited from interface org.opengis.filter.expression.Expression
accept, evaluate
 
Methods inherited from interface org.opengis.filter.expression.BinaryExpression
getExpression1, getExpression2, setExpression1, setExpression2
 

Method Detail

getValue

public java.lang.Object getValue(Feature feature)
Deprecated. use Expression.evaluate(Feature).

Returns the value for this expression.

Specified by:
getValue in interface Expression
Parameters:
feature - Feature to use when return sub expression values.
Returns:
Value of this expression.

addRightValue

public 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

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

Gets the type of this expression.

Specified by:
getType in interface Expression
Returns:
Expression type.

getLeftValue

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

Gets the left expression.

Returns:
the expression on the left of the comparison.

getRightValue

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

Gets the right expression.

Returns:
the expression on the right of the comparison.

addLeftValue

public 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 © GeoTools. All Rights Reserved.