Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Contact:

Jody Garnett

Tracker:

https://jira.codehaus.org/browse/GEOT-3519

Tagline:

Excerpt

describe a function

Section
Column
width70%
Table of Contents
Column

Children:

Children Display

Description

The gt-opengis interfaces provide the concept of *FunctionName*. We currently make FunctionName available through the FunctionFactory interface; this offers a the name of the function, the number of arguments, and the names of each argument that can be presented to the user.

Our default implementation, DefaultFunctionFinder, using FactorySPI reflection against Function implementation is is only able to fake this information.

I would like to make this information available by adding:

  • Function.getFunctionName()
  • FunctionFinder.getFunctionNames()
  • FilterFactory.functionName(name, nargs, argNames)

See tasks for a description of the current patch.

The optional part of this proposal has been carved off as a separate undertaking: FilterFactory cleanup

Status

This proposal needs some discussion; but it already has a patch on the attached JIRA.

Voting has not started yet:

Tasks

 

no progress

(tick)

done

(error)

impeded

(warning)

lack mandate/funds/time

(question)

volunteer needed

  1. (tick) Add Filter.getFunctionName()
  2. (tick) Update the base classes (so existing implementations will work)
  3. (tick) Update the unique implementations (making use of static NAME field where provided)
  4. (tick) Remove deprecated CommonFactoryFinder.getFunctionExpression() as it has not been used or useful for ages
  5. (tick) Update DefaultFunctionFactory to use Name information (yay!)
  6. (tick) Addition of FilterFactory.functionName(String name, int nargs, List<String> argNames) (preexisting mistake)
  7. (tick) No sample code is effected by this change
  8. Update the user guide diagram and text for Function

Function API Change

BEFORE

Code Block
public interface Function extends Expression {
    String getName();
    List<Expression> getParameters();
    Literal getFallbackValue();
}
interface FilterFactory {
    ....
    /** function name */
    FunctionName functionName(String name, int nargs);
    ...
}
class FunctionFinder {
   ..
}

AFTER

Code Block
public interface Function extends Expression {
    String getName();
    FunctionName getFunctionName();
    List<Expression> getParameters();
    Literal getFallbackValue();
}
interface FilterFactory {
    ....
    /** function name */
    FunctionName functionName(String name, int nargs);
    FunctionName functionName(String name, int nargs, List<String> argNames);
    ...
}
class FunctionFinder {
   List<FunctionName> getAllFunctionDescriptions()
   FunctionName findFunctionDescription(String)
   ..
}

Documentation Changes