org.shapelogic.scripting
Class FunctionTransform<In,E>
java.lang.Object
org.shapelogic.scripting.FunctionTransform<In,E>
- All Implemented Interfaces:
- IndexTransform<In,E>
public class FunctionTransform<In,E>
- extends java.lang.Object
- implements IndexTransform<In,E>
IndexTransform based on an expression in a Scripting language using JSR 223.
Requires Groovy to be installed. Need special installation of groovy-engine.jar
that need to be downloade from Sun.
Requires that the scripting language support the invocable interface.
- Author:
- Sami Badawi
|
Constructor Summary |
FunctionTransform(java.lang.String name,
java.lang.String expression)
|
FunctionTransform(java.lang.String name,
java.lang.String expression,
java.lang.String language)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FUNCTION_NAME_SUFFIX
public static final java.lang.String FUNCTION_NAME_SUFFIX
- See Also:
- Constant Field Values
DEFAULT_LANGUAGE
public static final java.lang.String DEFAULT_LANGUAGE
- See Also:
- Constant Field Values
_scriptingConnect
protected ScriptingConnect _scriptingConnect
_scriptEngine
protected javax.script.ScriptEngine _scriptEngine
_scriptEngineManager
protected javax.script.ScriptEngineManager _scriptEngineManager
_name
protected java.lang.String _name
_expression
protected java.lang.String _expression
_functionName
protected java.lang.String _functionName
_language
protected java.lang.String _language
FunctionTransform
public FunctionTransform(java.lang.String name,
java.lang.String expression,
java.lang.String language)
FunctionTransform
public FunctionTransform(java.lang.String name,
java.lang.String expression)
getScriptingConnect
public ScriptingConnect getScriptingConnect()
- Lazy init for ScriptingCoonect
getScriptEngine
public javax.script.ScriptEngine getScriptEngine()
- Lazy init for a ScriptEngine
transform
public E transform(In input,
int index)
- Specified by:
transform in interface IndexTransform<In,E>
put
public void put(java.lang.String key,
java.lang.Object value)
Copyright © 2008. All Rights Reserved.