Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.common.filter.internal
Class AbstractGeotoolsFilter

java.lang.Object
  extended by eu.esdihumboldt.hale.common.filter.internal.AbstractGeotoolsFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
FilterGeoCqlImpl, FilterGeoECqlImpl

public abstract class AbstractGeotoolsFilter
extends Object
implements Filter

Geotools based filter. Two filters are seen as equal if they are based on the same filter expression.

Author:
Sebastian Reinhardt, Simon Templer

Constructor Summary
AbstractGeotoolsFilter(String filterTerm)
          Create a Geotools based filter.
 
Method Summary
protected abstract  org.opengis.filter.Filter createFilter(String filterTerm)
          Create the fitler from the filter term.
 boolean equals(Object obj)
           
 String getFilterTerm()
          Get the ECQL expression the filter is based on.
 int hashCode()
           
 boolean match(Instance instance)
          Determines if an instance matches the filter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractGeotoolsFilter

public AbstractGeotoolsFilter(String filterTerm)
                       throws org.geotools.filter.text.cql2.CQLException
Create a Geotools based filter.

Parameters:
filterTerm - the filter expression
Throws:
org.geotools.filter.text.cql2.CQLException - if parsing the filter expression fails
Method Detail

createFilter

protected abstract org.opengis.filter.Filter createFilter(String filterTerm)
                                                   throws org.geotools.filter.text.cql2.CQLException
Create the fitler from the filter term.

Parameters:
filterTerm - the filter term
Returns:
the filter
Throws:
org.geotools.filter.text.cql2.CQLException - if an error occurs on filter creation

match

public boolean match(Instance instance)
Description copied from interface: Filter
Determines if an instance matches the filter.

Specified by:
match in interface Filter
Parameters:
instance - the instance to check the filter against
Returns:
true if the given instance matches the filter, false otherwise

getFilterTerm

public String getFilterTerm()
Get the ECQL expression the filter is based on.

Returns:
the ECQL expression

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d