Interface ILcdOGCFilterEvaluator

All Known Implementing Classes:
TLcdOGCFilterEvaluator, TLcdOGCFilterSpatialEvaluator

public interface ILcdOGCFilterEvaluator

This is the common interface for all implementations able to evaluate or interpret an OGC filter (see TLcdOGCFilter).

For a given TLcdOGCFilter object, a filter evaluator implementation must return an ILcdDynamicFilter object that can be invoked successively for all the objects of a given model in order to check whether the given filter accept them or not.

The filter evaluator implementation is also able to provide a property retriever for a given ILcdOGCExpression object. i.e. a way to get the expression value for a given object.

In order to be able to interpret a filter or an expression, those implementations must be provided with a feature ID retriever, a property retriever provider and a default georeference that will be used for non-georeferenced geometries. All this information is stored in a TLcdOGCFilterContext object.

The instances must be intended to be shared among threads. The methods buildPropertyRetriever(ILcdOGCExpression, TLcdOGCFilterContext) and buildPropertyRetriever(ILcdOGCExpression, TLcdOGCFilterContext) must support concurrent calls.

Note: there is no reason to implement this interface yourself. Instead, use the TLcdOGCFilterEvaluator class which is an implementation of this interface. The class javadoc of that class also contains example code snippets on how to use the filter evaluator.

  • Method Details

    • buildFilter

      ILcdDynamicFilter buildFilter(TLcdOGCFilter aFilter, TLcdOGCFilterContext aContext)

      Builds an ILcdDynamicFilter instance for a given OGC filter. This ILcdDynamicFilter instance can be invoked for a given object to check whether the given OGC filter accepts it or not.

      The returned ILcdFilter instance must be thread-safe.

      Parameters:
      aFilter - the given filter.
      aContext - a filter context.
      Returns:
      the given filter.
    • buildPropertyRetriever

      ILcdPropertyRetriever buildPropertyRetriever(ILcdOGCExpression aExpression, TLcdOGCFilterContext aContext)
      Builds an ILcdPropertyRetriever instance for a given OGC expression. This ILcdPropertyRetriever instance can be invoked for a given object to obtain the value of the given OGC filter expression.
      Parameters:
      aExpression - the given OGC expression.
      aContext - a filter context.
      Returns:
      the value of the expression.
    • getFilterCapabilities

      TLcdOGCFilterCapabilities getFilterCapabilities()
      Returns the filter capabilities for this evaluator.
      Returns:
      the filter capabilities for this evaluator.