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.
FilterDelegate| Modifier and Type | Method and Description |
|---|---|
<T> T |
adapt(org.opengis.filter.Filter filter,
FilterDelegate<T> filterDelegate)
Visit
Filter nodes and invoke FilterDelegate methods with normalized input. |
<T> T adapt(org.opengis.filter.Filter filter,
FilterDelegate<T> filterDelegate)
throws UnsupportedQueryException
Filter nodes and invoke FilterDelegate methods with normalized input.filter - OGC Filter to visitfilterDelegate - delegate to invoke will visitingUnsupportedQueryExceptionThis work is licensed under a Creative Commons Attribution 4.0 International License.