net.sourceforge.taverna.scuflworkers.bsf
Class BSFProcessor

java.lang.Object
  extended by org.embl.ebi.escience.scufl.Processor
      extended by net.sourceforge.taverna.scuflworkers.bsf.BSFProcessor
All Implemented Interfaces:
java.io.Serializable, IProcessor

public class BSFProcessor
extends Processor
implements java.io.Serializable

A processor that uses the BSF scripting engine to allow arbitrary scripts to be invoked on workflow data. In this implementation all inputs and outputs are strings, if this becomes a serious issue I guess we can change it but for now this will do.

Author:
mfortner
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.embl.ebi.escience.scufl.IProcessor
ENACTOR
 
Constructor Summary
BSFProcessor(ScuflModel model, java.lang.String name, java.lang.String script, java.lang.String[] inputs, java.lang.String[] outputs)
          Construct a new processor with the given model and name, delegates to the superclass and sets the script up correctly along with the input and output port name arrays.
 
Method Summary
 java.lang.String getLanguage()
           
 java.util.Properties getProperties()
          Get the properties for this processor for display purposes
 java.lang.String getScript()
          Get the script
 void setLanguage(java.lang.String language)
           
 void setScript(java.lang.String theScript)
          Set the script
 
Methods inherited from class org.embl.ebi.escience.scufl.Processor
addAlternate, addAnnotationTemplate, addBreakpoint, addPort, defaultAnnotationTemplates, fireModelEvent, getAlternatesArray, getAlternatesList, getAnnotationTemplates, getBackoff, getBoundInputPorts, getBoundOutputPorts, getCritical, getDefaultWorkers, getDescription, getInputPorts, getIterationStrategy, getLogLevel, getMaximumWorkers, getModel, getName, getOutputPorts, getPorts, getRealLogLevel, getResourceHost, getRetries, getRetryDelay, getTimeout, getWorkers, hasBreakpoint, isBoring, isOffline, locatePort, locatePort, removeAlternate, removeAnnotationTemplate, removePort, rmvBreakpoint, setBackoff, setBoring, setCritical, setDescription, setIterationStrategy, setLogLevel, setName, setOffline, setOnline, setRetries, setRetryDelay, setTimeout, setWorkers, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BSFProcessor

public BSFProcessor(ScuflModel model,
                    java.lang.String name,
                    java.lang.String script,
                    java.lang.String[] inputs,
                    java.lang.String[] outputs)
             throws ProcessorCreationException,
                    DuplicateProcessorNameException
Construct a new processor with the given model and name, delegates to the superclass and sets the script up correctly along with the input and output port name arrays.

Throws:
ProcessorCreationException
DuplicateProcessorNameException
Method Detail

setScript

public void setScript(java.lang.String theScript)
Set the script


getScript

public java.lang.String getScript()
Get the script


getLanguage

public java.lang.String getLanguage()
Returns:
Returns the language.

setLanguage

public void setLanguage(java.lang.String language)
Parameters:
language - The language to set.

getProperties

public java.util.Properties getProperties()
Get the properties for this processor for display purposes

Specified by:
getProperties in interface IProcessor
Specified by:
getProperties in class Processor
Returns:
a Properties instance containing all processor-specific properties, or optinally null if there are none