Interface FunctionRegister

All Known Implementing Classes:
Registry

public interface FunctionRegister
A factory of org.opengis.filter functions identified by their names. Each factory can provide an arbitrary number of functions, enumerated by getNames(). The DefaultFilterFactory.function(String, Expression...) method delegates to this interface for creating the function implementation for a given name.

Warning: there is currently no mechanism for avoiding name collision. It is implementer responsibility to keep trace of the whole universe of functions and avoid collision. This interface is hidden in internal API (for now) for that reason, and also because the API may change in any future Apache SIS version.

Since:
1.0
Version:
1.1
See Also:
  • invalid reference
    org.opengis.filter.FilterFactory#function(String, Expression...)
  • Method Summary

    Modifier and Type
    Method
    Description
    <R> Expression<R,?>
    create(String name, Expression<? super R,?>[] parameters)
    Create a new function of the given name with given parameters.
    Returns the name of the standard or authority defining the functions.
    Returns the names of all functions that this factory can create.
  • Method Details

    • getAuthority

      String getAuthority()
      Returns the name of the standard or authority defining the functions.
      Returns:
      provider of function definitions.
    • getNames

      Collection<String> getNames()
      Returns the names of all functions that this factory can create. It is currently implementer responsibility to ensure that there are no name collisions with functions provided by other factories (this problem may be improved in future SIS release).
      Returns:
      set of supported function names.
    • create

      <R> Expression<R,?> create(String name, Expression<? super R,?>[] parameters) throws IllegalArgumentException
      Create a new function of the given name with given parameters.
      Type Parameters:
      R - the type of resources (e.g. Feature) used as inputs.
      Parameters:
      name - name of the function to create (not null).
      parameters - function parameters.
      Returns:
      function for the given name and parameters.
      Throws:
      IllegalArgumentException - if function name is unknown or some parameters are illegal.