org.geotools.filter
Class AreaFunction

java.lang.Object
  extended byorg.geotools.filter.AreaFunction
All Implemented Interfaces:
Expression, ExpressionType, Factory, FunctionExpression

public class AreaFunction
extends java.lang.Object
implements FunctionExpression

Author:
James

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
 
Constructor Summary
AreaFunction()
          Creates a new instance of AreaFunction
 
Method Summary
 void accept(FilterVisitor visitor)
          Used by FilterVisitors to perform some action on this filter instance.
 int getArgCount()
          Returns the number of arguments this requires.
 Expression[] getArgs()
          Gets the arguments to be evaluated by this function.
 java.util.Map getImplementationHints()
          Returns the implementation hints.
 java.lang.String getName()
          Gets the name of this function.
 short getType()
          Gets the type of this expression.
 java.lang.Object getValue(Feature feature)
          Returns a value for this expression.
 void setArgs(Expression[] args)
          Sets the arguments to be evaluated by this function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaFunction

public AreaFunction()
Creates a new instance of AreaFunction

Method Detail

getType

public short getType()
Description copied from interface: FunctionExpression
Gets the type of this expression.

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

getValue

public java.lang.Object getValue(Feature feature)
Returns a value for this expression.

Specified by:
getValue in interface Expression
Parameters:
feature - Specified feature to use when returning value.
Returns:
Value of the feature object.

getArgCount

public int getArgCount()
Description copied from interface: FunctionExpression
Returns the number of arguments this requires. For example [arg1][arg2]. This function must have EXACTLY 2 arguments, so this function would return 2. The parser might use this information to ensure validity, and its also for reporting capabilities. NOTE: this was previously javadoc-ed incorrectly, please note the new definition. NOTE: you cannot have a function with a variable number of arguments.

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

getName

public java.lang.String getName()
Description copied from interface: FunctionExpression
Gets the name of this function.

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

setArgs

public void setArgs(Expression[] args)
Description copied from interface: FunctionExpression
Sets the arguments to be evaluated by this function.

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

accept

public void accept(FilterVisitor visitor)
Used by FilterVisitors to perform some action on this filter instance. Typicaly used by Filter decoders, but may also be used by any thing which needs infomration from filter structure. Implementations should always call: visitor.visit(this); It is importatant that this is not left to a parent class unless the parents API is identical.

Specified by:
accept in interface Expression
Parameters:
visitor - The visitor which requires access to this filter, the method must call visitor.visit(this);

getArgs

public Expression[] getArgs()
Description copied from interface: FunctionExpression
Gets the arguments to be evaluated by this function.

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

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.