/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.filter; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.logging.Logger; import org.geotools.factory.CommonFactoryFinder; import org.geotools.factory.Hints; import org.geotools.feature.NameImpl; import org.opengis.feature.type.Name; import org.opengis.filter.capability.FunctionName; import org.opengis.filter.expression.Function; import org.opengis.filter.expression.Literal; /** * Isolate function lookup code from Factory implementation(s). *
* This is done to look for two things: *
* 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.
* @param name Function name; this will need to be an exact match
* @param parameters Set of Expressions to use as function parameters
* @param fallbackValue Literal to use if an implementation could not be found
* @return Function for the provided name, may be a FallbackFunction if an implementation could not be found
*/
public Function findFunction(String name, List
* 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.
* @param name Function name; this will need to be an exact match
* @param parameters Set of Expressions to use as function parameters
* @param fallbackValue Literal to use if an implementation could not be found
* @return Function for the provided name, may be a FallbackFunction if an implementation could not be found
*/
public Function findFunction(Name name, List