Interface FilterAdapter


public interface FilterAdapter
FilterAdapter visits a Filter and invokes FilterDelegate methods with normalized, typed values. A large part of implementing a FilterVisitor is handling expressions, type casting literals, and supporting custom filter logic like FuzzyFunction s. The FilterAdapter handles all of this common boilerplate functionality. Furthermore, sources using the FilterAdapter will receive future enhancements and ensure basic compatibility with Endpoints that use the FilterBuilder.

To use the FilterAdapter, a FilterDelegate for the source is required. Here is an example using a text base filter delegate.

 FilterDelegate<String> delegate = new FilterToTextDelegate();

 FilterAdapter adapter = new FilterAdapterImpl();

 String result = adapter.adapt(filter, delegate);
 
A reference implementation is provided with the DDF Core in the Filter Proxy bundle.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    adapt(org.geotools.api.filter.Filter filter, FilterDelegate<T> filterDelegate)
    Visit Filter nodes and invoke FilterDelegate methods with normalized input.
  • Method Details

    • adapt

      <T> T adapt(org.geotools.api.filter.Filter filter, FilterDelegate<T> filterDelegate) throws UnsupportedQueryException
      Visit Filter nodes and invoke FilterDelegate methods with normalized input.
      Parameters:
      filter - OGC Filter to visit
      filterDelegate - delegate to invoke will visiting
      Returns:
      result of adapted filter output
      Throws:
      UnsupportedQueryException