org.geotools.filter
Class FilterAbstract

Object
  extended by FilterAbstract
All Implemented Interfaces:
Filter
Direct Known Subclasses:
AbstractFilter

public abstract class FilterAbstract
extends Object
implements Filter

Abstract implementation for Filter.

Author:
Jody Garnett

Field Summary
protected  FilterFactory factory
          filter factory
 
Fields inherited from interface Filter
EXCLUDE, INCLUDE
 
Constructor Summary
protected FilterAbstract(FilterFactory factory)
           
 
Method Summary
 Object accept(FilterVisitor visitor, Object extraData)
          Subclass should override, default implementation just returns extraData
 boolean accepts(SimpleFeature feature)
          Straight call throught to: evaulate( feature )
protected  Object eval(Expression expression, Object object)
          Helper method for subclasses to reduce null checks and automatically unpack values from attributes and collections
protected  Object eval(Expression expression, Object object, Class context)
          Helper method for subclasses to reduce null checks
protected  Object eval(Expression expression, SimpleFeature feature)
          Helper method for subclasses to reduce null checks
 boolean evaluate(SimpleFeature feature)
          Subclass should overrride.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Filter
evaluate
 

Field Detail

factory

protected FilterFactory factory
filter factory

Constructor Detail

FilterAbstract

protected FilterAbstract(FilterFactory factory)
Parameters:
factory - FilterFactory injected into the filter.
Method Detail

evaluate

public boolean evaluate(SimpleFeature feature)
Subclass should overrride. Default value is false


accepts

public boolean accepts(SimpleFeature feature)
Straight call throught to: evaulate( feature )


accept

public Object accept(FilterVisitor visitor,
                     Object extraData)
Subclass should override, default implementation just returns extraData

Specified by:
accept in interface Filter

eval

protected Object eval(Expression expression,
                      SimpleFeature feature)
Helper method for subclasses to reduce null checks

Parameters:
expression -
feature -
Returns:
value or null

eval

protected Object eval(Expression expression,
                      Object object)
Helper method for subclasses to reduce null checks and automatically unpack values from attributes and collections

Parameters:
expression -
object -
Returns:
value or null

eval

protected Object eval(Expression expression,
                      Object object,
                      Class context)
Helper method for subclasses to reduce null checks

Parameters:
expression -
object -
context -
Returns:
value or null


Copyright © 1996-2014 Geotools. All Rights Reserved.