org.geotools.filter
Class NullFilterImpl

java.lang.Object
  extended byorg.geotools.filter.FilterAbstract
      extended byorg.geotools.filter.AbstractFilter
          extended byorg.geotools.filter.AbstractFilterImpl
              extended byorg.geotools.filter.NullFilterImpl
All Implemented Interfaces:
Filter, org.opengis.filter.Filter, FilterType, NullFilter, org.opengis.filter.PropertyIsNull

public class NullFilterImpl
extends AbstractFilterImpl
implements NullFilter

Defines a null filter, which checks to see if an attribute is null.

Version:
$Id: NullFilterImpl.java 18021 2006-02-14 20:36:18Z jdeolive $
Author:
Rob Hranac, Vision for New York

Field Summary
 
Fields inherited from class org.geotools.filter.AbstractFilter
filterType, LOGGER, permissiveConstruction
 
Fields inherited from interface org.geotools.filter.Filter
ALL, NONE
 
Fields inherited from interface org.geotools.filter.FilterType
BETWEEN, COMPARE_EQUALS, COMPARE_GREATER_THAN, COMPARE_GREATER_THAN_EQUAL, COMPARE_LESS_THAN, COMPARE_LESS_THAN_EQUAL, COMPARE_NOT_EQUALS, FID, GEOMETRY_BBOX, GEOMETRY_BEYOND, GEOMETRY_CONTAINS, GEOMETRY_CROSSES, GEOMETRY_DISJOINT, GEOMETRY_DWITHIN, GEOMETRY_EQUALS, GEOMETRY_INTERSECTS, GEOMETRY_OVERLAPS, GEOMETRY_TOUCHES, GEOMETRY_WITHIN, LIKE, LOGIC_AND, LOGIC_NOT, LOGIC_OR, NULL
 
Constructor Summary
protected NullFilterImpl()
          Constructor which sets the type as null check.
 
Method Summary
 java.lang.Object accept(org.opengis.filter.FilterVisitor visitor, java.lang.Object extraData)
          Used by FilterVisitors to perform some action on this filter instance.
 boolean equals(java.lang.Object obj)
          Compares this filter to the specified object.
 boolean evaluate(Feature feature)
          Determines whether or not a given feature is 'inside' this filter.
 org.opengis.filter.expression.Expression getExpression()
          Returns the expression which represents the null check.
 Expression getNullCheckValue()
          Deprecated. use getExpression().
 int hashCode()
          Override of hashCode method.
 void nullCheckValue(Expression nullCheck)
          Deprecated. use PropertyIsNull.setExpression(Expression)
 void setExpression(org.opengis.filter.expression.Expression nullCheck)
          Sets the expression which represents the null check.
 java.lang.String toString()
          Returns a string representation of this filter.
 
Methods inherited from class org.geotools.filter.AbstractFilterImpl
and, not, or
 
Methods inherited from class org.geotools.filter.AbstractFilter
accept, contains, evaluate, getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
 
Methods inherited from class org.geotools.filter.FilterAbstract
accepts, comparable, eval, eval
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.NullFilter
contains
 
Methods inherited from interface org.geotools.filter.Filter
accept, and, getFilterType, not, or
 
Methods inherited from interface org.opengis.filter.Filter
evaluate
 

Constructor Detail

NullFilterImpl

protected NullFilterImpl()
Constructor which sets the type as null check.

Method Detail

nullCheckValue

public final void nullCheckValue(Expression nullCheck)
                          throws IllegalFilterException
Deprecated. use PropertyIsNull.setExpression(Expression)

Determines whether or not a given feature is 'inside' this filter.

Specified by:
nullCheckValue in interface NullFilter
Parameters:
nullCheck - The attribute expression to null check.
Throws:
IllegalFilterException - If attempting to add a non-attribute expression.
Task:
REVISIT: change arg to AttributeExpression?, REVISIT: change name to setNullCheckValue.

getNullCheckValue

public final Expression getNullCheckValue()
Deprecated. use getExpression().

Returns the expression being checked for null.

Specified by:
getNullCheckValue in interface NullFilter
Returns:
the Expression to null check.

getExpression

public org.opengis.filter.expression.Expression getExpression()
Returns the expression which represents the null check.

Specified by:
getExpression in interface org.opengis.filter.PropertyIsNull

setExpression

public void setExpression(org.opengis.filter.expression.Expression nullCheck)
Sets the expression which represents the null check.

Specified by:
setExpression in interface org.opengis.filter.PropertyIsNull

evaluate

public boolean evaluate(Feature feature)
Determines whether or not a given feature is 'inside' this filter.

Specified by:
evaluate in interface Filter
Overrides:
evaluate in class FilterAbstract
Parameters:
feature - Specified feature to examine.
Returns:
Flag confirming whether or not this feature is inside the filter.

toString

public java.lang.String toString()
Returns a string representation of this filter.

Returns:
String representation of the null filter.

equals

public boolean equals(java.lang.Object obj)
Compares this filter to the specified object. Returns true if the passed in object is the same as this filter. Checks to make sure the filter types, and the NullCheckValue are the same.

Parameters:
obj - - the object to compare this LikeFilter against.
Returns:
true if specified object is equal to this filter; false otherwise.

hashCode

public int hashCode()
Override of hashCode method.

Returns:
a hash code value for this geometry filter.

accept

public java.lang.Object accept(org.opengis.filter.FilterVisitor visitor,
                               java.lang.Object extraData)
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 org.opengis.filter.Filter
Overrides:
accept in class FilterAbstract
Parameters:
visitor - The visitor which requires access to this filter, the method must call visitor.visit(this);


Copyright © GeoTools. All Rights Reserved.