org.geotools.filter
Class FunctionFinder

java.lang.Object
  extended by org.geotools.filter.FunctionFinder

public class FunctionFinder
extends java.lang.Object

Isolate function lookup code from Factory implementation(s).

This is done to look for two things:

This is done as a proper utility class that accepts Hints.

Author:
Jody Garnett

Constructor Summary
FunctionFinder(Hints hints)
           
 
Method Summary
 org.opengis.filter.expression.Function findFunction(java.lang.String name)
           
 org.opengis.filter.expression.Function findFunction(java.lang.String name, java.util.List parameters)
          Look up a function for the provided name.
 org.opengis.filter.expression.Function findFunction(java.lang.String name, java.util.List parameters, org.opengis.filter.expression.Literal fallback)
          Look up a function for the provided name, may return a FallbackFunction if an implementation could not be found.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionFinder

public FunctionFinder(Hints hints)
Method Detail

findFunction

public org.opengis.filter.expression.Function findFunction(java.lang.String name)

findFunction

public org.opengis.filter.expression.Function findFunction(java.lang.String name,
                                                           java.util.List parameters)
Look up a function for the provided name.

Parameters:
name - Function name; this will need to be an exact match
parameters - Set of parameters required
Returns:
Generated function
Throws:
a - RuntimeException if an implementation for name could not be found

findFunction

public org.opengis.filter.expression.Function findFunction(java.lang.String name,
                                                           java.util.List parameters,
                                                           org.opengis.filter.expression.Literal fallback)
Look up a function for the provided name, may return a FallbackFunction if an implementation could not be found.

You can create a function to represent an SQL function or a function hosted on an external service; the fallback value will be used if you evulate by a Java implementation on the classpath.

Parameters:
name - Function name; this will need to be an exact match
parameters - Set of Expressions to use as function parameters
fallbackValue - Literal to use if an implementation could not be found
Returns:
Function for the provided name, may be a FallbackFunction if an implementation could not be found


Copyright © 1996-2010 Geotools. All Rights Reserved.