public class ScriptingTransformer extends Object implements com.googlecode.fascinator.api.transformer.Transformer
This plugin provides method to execute Transformers using scripts written in Jython or Groovy
| Option | Description | Required | Default |
|---|---|---|---|
| id | Transformer Id | Yes | scripting |
"scripting": {
"id": "scripting",
"scriptType": "groovy",
"scriptPath": "${fascinator.home}/transformer-scripts/exampleScript.groovy"
}
| Constructor and Description |
|---|
ScriptingTransformer()
Extractor Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getId()
Overridden method getId
|
String |
getName()
Overridden method getName
|
com.googlecode.fascinator.api.PluginDescription |
getPluginDetails()
Gets a PluginDescription object relating to this plugin.
|
void |
init(File jsonFile)
Overridden method init to initialize
|
void |
init(String jsonString)
Overridden method init to initialize
|
void |
shutdown()
Overridden method shutdown method
|
com.googlecode.fascinator.api.storage.DigitalObject |
transform(com.googlecode.fascinator.api.storage.DigitalObject in,
String jsonConfig)
Overridden transform method
|
public void init(String jsonString) throws com.googlecode.fascinator.api.PluginException
init in interface com.googlecode.fascinator.api.PluginjsonString - of configuration for Extractorcom.googlecode.fascinator.api.PluginException - if fail to parse the configpublic void init(File jsonFile) throws com.googlecode.fascinator.api.PluginException
init in interface com.googlecode.fascinator.api.PluginjsonFile - to retrieve the configuration for Extractorcom.googlecode.fascinator.api.PluginException - if fail to read the config filepublic String getId()
getId in interface com.googlecode.fascinator.api.Pluginpublic String getName()
getName in interface com.googlecode.fascinator.api.Pluginpublic com.googlecode.fascinator.api.PluginDescription getPluginDetails()
getPluginDetails in interface com.googlecode.fascinator.api.Pluginpublic void shutdown()
throws com.googlecode.fascinator.api.PluginException
shutdown in interface com.googlecode.fascinator.api.Plugincom.googlecode.fascinator.api.PluginExceptionpublic com.googlecode.fascinator.api.storage.DigitalObject transform(com.googlecode.fascinator.api.storage.DigitalObject in,
String jsonConfig)
throws com.googlecode.fascinator.api.transformer.TransformerException
transform in interface com.googlecode.fascinator.api.transformer.TransformerDigitalObject - to be processedcom.googlecode.fascinator.api.transformer.TransformerExceptionCopyright © 2009-2016. All Rights Reserved.