org.geotools.filter.expression
Class ExpressionAbstract

java.lang.Object
  extended byorg.geotools.filter.expression.ExpressionAbstract
All Implemented Interfaces:
org.opengis.filter.expression.Expression
Direct Known Subclasses:
DefaultExpression

public abstract class ExpressionAbstract
extends java.lang.Object
implements org.opengis.filter.expression.Expression

Abstract superclass of these Expression implementations.

Contains additional support for "Expression chaining". This allows Expressions to be constructed as a chain of Java commands similar to the use of the java collections api.

Note: Expression chaining is a simple developer convience, it has no effect on the data model exposed by the GeoAPI interfaces.

Idea: We may also be able to teach this implementation to make use of JXPath to extract "attribute values" from Java Beans, DOM, JDOM in addition to the geotools & geoapi FeatureType models. It is a cunning plan - any implementation will make use of this abstract base class.

Author:
Jody Garnett

Constructor Summary
ExpressionAbstract()
           
 
Method Summary
 java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor, java.lang.Object extraData)
          Subclass should override, default implementation just returns extraData
protected  java.lang.Object eval(Expression expression, Feature feature)
          Helper method for subclasses to reduce null checks
 java.lang.Object evaluate(Feature feature)
          Subclass should overide, default implementation returns null
 java.lang.Object evaluate(java.lang.Object object)
          Subclass should overide, default implementation returns null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionAbstract

public ExpressionAbstract()
Method Detail

evaluate

public java.lang.Object evaluate(Feature feature)
Subclass should overide, default implementation returns null


evaluate

public java.lang.Object evaluate(java.lang.Object object)
Subclass should overide, default implementation returns null

Specified by:
evaluate in interface org.opengis.filter.expression.Expression

accept

public java.lang.Object accept(org.opengis.filter.expression.ExpressionVisitor visitor,
                               java.lang.Object extraData)
Subclass should override, default implementation just returns extraData

Specified by:
accept in interface org.opengis.filter.expression.Expression

eval

protected java.lang.Object eval(Expression expression,
                                Feature feature)
Helper method for subclasses to reduce null checks

Parameters:
expression -
feature -
Returns:
value or null


Copyright © GeoTools. All Rights Reserved.