Interface ILcdEvaluatorFactory

All Known Implementing Classes:
TLcdSLDFunctionEvaluatorFactory

@Deprecated public interface ILcdEvaluatorFactory
Deprecated.
There is no need to implement this interface yourself, or to use this interface directly.
Evaluating a filter is done by creating a TLcdOGCFilterEvaluator instance. The class javadoc of TLcdOGCFilterEvaluator contains an example of this.
Adding support for the evaluation of custom functions is achieved by implementing the ILcdEvaluatorFunction interface. The javadoc of that interface illustrates this with an example.

Creates ILcdEvaluator objects for generic expressions. Retrieving the value of the evaluator for an object is then equivalent to evaluating the expression.

An evaluator factory indicates what expressions it can handle and can publish this information in a TLcdOGCFilterCapabilities.

Implementations of this interface must be thread safe. The created ILcdEvaluator instances however can be non thread safe.

  • Method Details

    • canBuildEvaluator

      @Deprecated boolean canBuildEvaluator(ILcdGenericExpression aGenericExpression)
      Indicates whether this factory is capable of creating an evaluator for the given expression. The implementation of this method should be compatible with the implementation of populateCapabilities. If a factory can handle a given expression, this should also be clear from the filter capabilities produced by this factory.
      Parameters:
      aGenericExpression - the expression to build an evaluator for, if possible.
      Returns:
      whether or not this factory is capable of providing an ILcdEvaluator that can handle the expression given.
    • canBuildEvaluator

      default boolean canBuildEvaluator(ILcdGenericExpression aGenericExpression, ILcdEvaluatorFactory aEvaluatorFactory, TLcdOGCFilterContext aContext)
      Deprecated.
      Indicates whether this factory is capable of creating an evaluator for the given expression. The implementation of this method should be compatible with the implementation of populateCapabilities. If a factory can handle a given expression, this should also be clear from the filter capabilities produced by this factory.
      Parameters:
      aGenericExpression - the expression to build an evaluator for.
      aEvaluatorFactory - the evaluator factory to use to build evaluators for sub-expressions, since an expression may be composed of other expressions.
      aContext - the context for which to create the evaluator. The context among others contains a property retriever provider to determine how properties should be retrieved from (OGC) features.
      Returns:
      whether or not this factory is capable of providing an ILcdEvaluator that can handle the expression given.
      Since:
      2020.0.02
    • buildEvaluator

      ILcdEvaluator buildEvaluator(ILcdGenericExpression aGenericExpression, ILcdEvaluatorFactory aEvaluatorFactory, TLcdOGCFilterContext aContext)
      Deprecated.
      Creates an evaluator for the given expression in the given filter context. This method should only be called if canBuildEvaluator returned true.
      Parameters:
      aGenericExpression - the expression to build an evaluator for.
      aEvaluatorFactory - the evaluator factory to use to build evaluators for sub-expressions, since an expression may be composed of other expressions.
      aContext - the context for which to create the evaluator. The context among others contains a property retriever provider to determine how properties should be retrieved from (OGC) features.
      Returns:
      an evaluator that evaluates the expression.
    • populateCapabilities

      void populateCapabilities(TLcdOGCFilterCapabilities aFilterCapabilities)
      Deprecated.
      Populates the filter capabilities, indicating what kind of expressions can be evaluated. If an expression is supported as documented in the capabilities, the method canBuildEvaluator should return true.
      Parameters:
      aFilterCapabilities - the filter capabilities in which to declare what kind of expressions can be evaluated.