jigcell.compare.transform
Class ScriptEvaluationTransform
java.lang.Object
javax.swing.TransferHandler
jigcell.compare.impl.Transferer
jigcell.compare.impl.DataSource
jigcell.compare.data.DataGenerator
jigcell.compare.data.EditableDataGenerator
jigcell.compare.data.ProgrammableDataGenerator
jigcell.compare.transform.Transform
jigcell.compare.transform.ScriptEvaluationTransform
- All Implemented Interfaces:
- java.awt.datatransfer.Transferable, java.beans.PropertyChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, IDataGenerator, IDataSource, IEditableDataGenerator, IProgrammableDataGenerator, IReadableDataSource, IWriteableDataSource, ITransform
public class ScriptEvaluationTransform
- extends Transform
Executes a user provided script when evaluated. Three variables are provided by default for the script. compare is a reference
to the active Comparator if known. input is a reference to the value returned by the previous transform.
transform is this transform.
This code is licensed under the DARPA BioCOMP Open Source License. See LICENSE for more details.
- Author:
- Nicholas Allen
- See Also:
- Serialized Form
|
Field Summary |
protected static java.lang.String |
NAME_TRANSFORM
Display name for this transform |
static java.lang.String |
OPTION_SCRIPT
Attribute for the script this transform executes during evaluation |
protected static java.lang.String |
VARIABLE_COMPARE
Variable to attach to compare |
protected static java.lang.String |
VARIABLE_INPUT
Variable to attach to transform input |
protected static java.lang.String |
VARIABLE_TRANSFORM
Variable to attach to transform |
| Fields inherited from class jigcell.compare.impl.Transferer |
CSV_FOOTER, CSV_LINEPOSTPEND, CSV_LINEPREPEND, CSV_LINESEPARATOR, HTML_FOOTER, HTML_HEADPOSTPEND, HTML_HEADPREPEND, HTML_HEADSEPARATOR, HTML_LINEPOSTPEND, HTML_LINEPREPEND, HTML_LINESEPARATOR |
| Fields inherited from class javax.swing.TransferHandler |
COPY, COPY_OR_MOVE, MOVE, NONE |
| Methods inherited from class jigcell.compare.transform.Transform |
clear, copy, evaluate, flush, getAllowContextInsertion, getAllowContextRemoval, getCompatibleTransforms, getContainer, getDependencies, getEvaluationContext, getNextStatement, getPreviousElement, getPreviousStatement, getSource, getTransformForGenerator, hasNextStatement, hasPreviousStatement, initializeSource, isReorderable, isRunnable, setAllowContextInsertion, setAllowContextRemoval, setAnnotation, setCompatibleTransforms, setContainer, setEvaluationContext, setNextStatement, setPreviousStatement |
| Methods inherited from class jigcell.compare.data.ProgrammableDataGenerator |
addEvaluationListener, createCustomizer, fireEvaluationError, fireEvaluationError, fireEvaluationStart, fireEvaluationStop, getAllowDescriptionQuery, getCallStack, getElement, getElement, getEvaluationLock, getInputTypeChecker, getInterface, getOutputTypeChecker, isCached, peekElement, peekInterface, propertyChange, removeEvaluationListener, setAllowDescriptionQuery, setInputTypeChecker, setInterfaceClass, setOutputTypeChecker, updateInterface |
| Methods inherited from class jigcell.compare.data.DataGenerator |
clone, compareByName, copy, generateGUID, getAttribute, getComment, getCopiedFrom, getName, getPredictedContents, getTransferData, isCopy, isCopyRelated, read, setCopyName, setName, toString |
| Methods inherited from class jigcell.compare.impl.DataSource |
addOption, addPropertyChangeListener, addPropertyChangeListener, configure, getOption, getOptions, getOptionType, getPropertyChangeListeners, getPropertyChangeListeners, getReadDescriptionOption, getReadIconOption, getState, getWriteDescriptionOption, getWriteIconOption, persistSource, removePropertyChangeListener, removePropertyChangeListener, setOptions, setOptionType, setReadDescriptionOption, setReadIconOption, setWriteDescriptionOption, setWriteIconOption, unpersistSource |
| Methods inherited from class jigcell.compare.impl.Transferer |
addExtension, addFlavor, createCSVTable, createFormattedTable, createHTMLTable, getExceptionRecorder, getExpectedClasses, getExpectedClasses, getExpectedClasses, getFlavors, getFlavors, getPreferredExtensions, getPreferredExtensions, getTransferClass, getTransferDataFlavors, getTransferFlavor, isDataFlavorSupported, transfer |
| Methods inherited from class javax.swing.TransferHandler |
canImport, createTransferable, exportAsDrag, exportDone, exportToClipboard, getCopyAction, getCutAction, getPasteAction, getSourceActions, getVisualRepresentation, importData |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.datatransfer.Transferable |
getTransferData, getTransferDataFlavors, isDataFlavorSupported |
OPTION_SCRIPT
public static final java.lang.String OPTION_SCRIPT
- Attribute for the script this transform executes during evaluation
- See Also:
- Constant Field Values
NAME_TRANSFORM
protected static final java.lang.String NAME_TRANSFORM
- Display name for this transform
- See Also:
- Constant Field Values
VARIABLE_COMPARE
protected static final java.lang.String VARIABLE_COMPARE
- Variable to attach to compare
- See Also:
- Constant Field Values
VARIABLE_INPUT
protected static final java.lang.String VARIABLE_INPUT
- Variable to attach to transform input
- See Also:
- Constant Field Values
VARIABLE_TRANSFORM
protected static final java.lang.String VARIABLE_TRANSFORM
- Variable to attach to transform
- See Also:
- Constant Field Values
ScriptEvaluationTransform
public ScriptEvaluationTransform()
- Creates a new transform that evaluates a script.
getCustomizableInstances
public static java.lang.Object getCustomizableInstances()
- Generates an instance.
getAnnotation
public ITransformAnnotation getAnnotation()
- An annotation object for this generator.
- Specified by:
getAnnotation in interface ITransform- Overrides:
getAnnotation in class Transform
getScript
public java.lang.String getScript()
- Beanshell script to execute during evaluation.
setScript
public void setScript(java.lang.String script)
- Sets the Beanshell script to execute during evaluation.
evaluate
protected IDataElement evaluate(IDataElement input)
- Evaluates the transform.
- Overrides:
evaluate in class Transform
- Parameters:
input - Transform input