org.geotools.filter
Class FunctionExpressionImpl

java.lang.Object
  extended byorg.geotools.filter.expression.ExpressionAbstract
      extended byorg.geotools.filter.DefaultExpression
          extended byorg.geotools.filter.FunctionExpressionImpl
All Implemented Interfaces:
org.opengis.filter.expression.Expression, Expression, ExpressionType, Factory, org.opengis.filter.expression.Function, FunctionExpression
Direct Known Subclasses:
AreaFunction, ClassificationFunction, Collection_AverageFunction, Collection_BoundsFunction, Collection_CountFunction, Collection_MaxFunction, Collection_MedianFunction, Collection_MinFunction, Collection_SumFunction, Collection_UniqueFunction, FilterFunction_area, FilterFunction_between, FilterFunction_boundary, FilterFunction_boundaryDimension, FilterFunction_buffer, FilterFunction_bufferWithSegments, FilterFunction_centroid, FilterFunction_contains, FilterFunction_convexHull, FilterFunction_crosses, FilterFunction_difference, FilterFunction_dimension, FilterFunction_disjoint, FilterFunction_distance, FilterFunction_double2bool, FilterFunction_endPoint, FilterFunction_envelope, FilterFunction_equalsExact, FilterFunction_equalsExactTolerance, FilterFunction_equalTo, FilterFunction_exteriorRing, FilterFunction_geometryType, FilterFunction_geomFromWKT, FilterFunction_geomLength, FilterFunction_getGeometryN, FilterFunction_getX, FilterFunction_getY, FilterFunction_greaterEqualThan, FilterFunction_greaterThan, FilterFunction_if_then_else, FilterFunction_in10, FilterFunction_in2, FilterFunction_in3, FilterFunction_in4, FilterFunction_in5, FilterFunction_in6, FilterFunction_in7, FilterFunction_in8, FilterFunction_in9, FilterFunction_int2bbool, FilterFunction_int2ddouble, FilterFunction_interiorPoint, FilterFunction_interiorRingN, FilterFunction_intersection, FilterFunction_intersects, FilterFunction_isClosed, FilterFunction_isEmpty, FilterFunction_isLike, FilterFunction_isNull, FilterFunction_isRing, FilterFunction_isSimple, FilterFunction_isValid, FilterFunction_isWithinDistance, FilterFunction_lessEqualThan, FilterFunction_lessThan, FilterFunction_not, FilterFunction_notEqualTo, FilterFunction_numGeometries, FilterFunction_numInteriorRing, FilterFunction_numPoints, FilterFunction_overlaps, FilterFunction_parseBoolean, FilterFunction_parseDouble, FilterFunction_parseInt, FilterFunction_pointN, FilterFunction_relate, FilterFunction_relatePattern, FilterFunction_roundDouble, FilterFunction_startPoint, FilterFunction_strConcat, FilterFunction_strEndsWith, FilterFunction_strEqualsIgnoreCase, FilterFunction_strIndexOf, FilterFunction_strLastIndexOf, FilterFunction_strLength, FilterFunction_strMatches, FilterFunction_strStartsWith, FilterFunction_strSubstring, FilterFunction_strSubstringStart, FilterFunction_strTrim, FilterFunction_symDifference, FilterFunction_touches, FilterFunction_toWKT, FilterFunction_union, FilterFunction_within, LengthFunction, MaxFunction, MinFunction, PaletteFunction

public abstract class FunctionExpressionImpl
extends DefaultExpression
implements FunctionExpression

Abstract class for a function expression implementation

Author:
James Macgill, PSU

Field Summary
 
Fields inherited from class org.geotools.filter.DefaultExpression
expressionType, permissiveConstruction
 
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
 
Constructor Summary
protected FunctionExpressionImpl()
          Creates a new instance of FunctionExpression
 
Method Summary
 java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
          Subclass should override, default implementation just returns extraData
abstract  int getArgCount()
          Gets the number of arguments that are set.
 Expression[] getArgs()
          Deprecated. use getParameters().
 java.util.Map getImplementationHints()
          Returns the implementation hints.
 java.lang.String getName()
          Gets the name of this function.
 java.util.List getParameters()
          Returns the function parameters.
 short getType()
          Gets the type of this expression.
 void setArgs(Expression[] args)
          Deprecated. use setParameters(List)
 void setName(java.lang.String name)
          Sets the name of hte function.
 void setParameters(java.util.List params)
          Sets the function paramters.
 
Methods inherited from class org.geotools.filter.DefaultExpression
accept, evaluate, evaluate, getValue, isAttributeExpression, isExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression
 
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract
eval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.expression.Expression
accept, evaluate, getValue
 
Methods inherited from interface org.opengis.filter.expression.Expression
evaluate
 

Constructor Detail

FunctionExpressionImpl

protected FunctionExpressionImpl()
Creates a new instance of FunctionExpression

Method Detail

getType

public short getType()
Gets the type of this expression.

Specified by:
getType in interface FunctionExpression
Overrides:
getType in class DefaultExpression
Returns:
the short representation of a function expression.

getName

public java.lang.String getName()
Gets the name of this function.

Specified by:
getName in interface FunctionExpression
Returns:
the name of the function.

setName

public void setName(java.lang.String name)
Sets the name of hte function.

Specified by:
setName in interface org.opengis.filter.expression.Function

getParameters

public java.util.List getParameters()
Returns the function parameters.

Specified by:
getParameters in interface org.opengis.filter.expression.Function

setParameters

public void setParameters(java.util.List params)
Sets the function paramters.

Specified by:
setParameters in interface org.opengis.filter.expression.Function

getArgs

public Expression[] getArgs()
Deprecated. use getParameters().

Since this class is heavily subclasses within the geotools toolkit itself we relax the 'final' restriction of this deprecated method.

Specified by:
getArgs in interface FunctionExpression
Returns:
an array of the args to be evaluated.

setArgs

public void setArgs(Expression[] args)
Deprecated. use setParameters(List)

Since this class is heavily subclassed within the geotools toolkit itself we relax the 'final' restriction of this deprecated method.

Specified by:
setArgs in interface FunctionExpression
Parameters:
args - an array of expressions to be evaluated.

getArgCount

public abstract int getArgCount()
Gets the number of arguments that are set.

Specified by:
getArgCount in interface FunctionExpression
Returns:
the number of args.

accept

public java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor,
                               java.lang.Object extraData)
Description copied from class: ExpressionAbstract
Subclass should override, default implementation just returns extraData

Specified by:
accept in interface org.opengis.filter.expression.Expression
Overrides:
accept in class ExpressionAbstract
See Also:
Expression.accept(ExpressionVisitor, Object)

getImplementationHints

public java.util.Map getImplementationHints()
Returns the implementation hints. The default implementation returns en empty map.

Specified by:
getImplementationHints in interface Factory
Returns:
The map of hints, or an empty map if none.


Copyright © GeoTools. All Rights Reserved.