org.geotools.filter
Class NullFilterImpl

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

public class NullFilterImpl
extends AbstractFilterImpl
implements NullFilter

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

Version:
$Id: NullFilterImpl.java,v 1.6 2003/07/30 16:42:29 cholmesny Exp $
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
 void accept(FilterVisitor visitor)
          Used by FilterVisitors to perform some action on this filter instance.
 boolean contains(Feature feature)
          Determines whether or not a given feature is 'inside' this filter.
 boolean equals(java.lang.Object obj)
          Compares this filter to the specified object.
 Expression getNullCheckValue()
          Returns the expression being checked for null.
 int hashCode()
          Override of hashCode method.
 void nullCheckValue(Expression nullCheck)
          Determines whether or not a given feature is 'inside' this filter.
 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
getFilterType, isCompareFilter, isGeometryDistanceFilter, isGeometryFilter, isLogicFilter, isMathFilter, isSimpleFilter
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.geotools.filter.Filter
and, getFilterType, not, or
 

Constructor Detail

NullFilterImpl

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

Method Detail

nullCheckValue

public void nullCheckValue(Expression nullCheck)
                    throws IllegalFilterException
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 Expression getNullCheckValue()
Returns the expression being checked for null.

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

contains

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

Specified by:
contains in interface NullFilter
Specified by:
contains in class AbstractFilter
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 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 Filter
Specified by:
accept in class AbstractFilter
Parameters:
visitor - The visitor which requires access to this filter, the method must call visitor.visit(this);


Copyright © GeoTools. All Rights Reserved.