public class PythonScriptAlgorithm extends JIPipeParameterSlotAlgorithm
JIPipeGraphNode.BaseDirectoryChangedEvent, JIPipeGraphNode.BaseDirectoryChangedEventEmitter, JIPipeGraphNode.BaseDirectoryChangedEventListener, JIPipeGraphNode.NodeSlotsChangedEvent, JIPipeGraphNode.NodeSlotsChangedEventEmitter, JIPipeGraphNode.NodeSlotsChangedEventListener, JIPipeGraphNode.Serializer
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterChangedEventEmitter, JIPipeParameterCollection.ParameterChangedEventListener, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEventEmitter, JIPipeParameterCollection.ParameterStructureChangedEventListener, JIPipeParameterCollection.ParameterUIChangedEvent, JIPipeParameterCollection.ParameterUIChangedEventEmitter, JIPipeParameterCollection.ParameterUIChangedEventListener
SLOT_PARAMETERS
Constructor and Description |
---|
PythonScriptAlgorithm(JIPipeNodeInfo info)
Creates a new instance
|
PythonScriptAlgorithm(PythonScriptAlgorithm other)
Creates a copy
|
Modifier and Type | Method and Description |
---|---|
JIPipeTextAnnotationMergeMode |
getAnnotationMergeStrategy() |
PythonScript |
getCode() |
void |
getExternalEnvironments(List<JIPipeEnvironment> target)
Gathers all known external environments
|
OptionalPythonEnvironment |
getOverrideEnvironment() |
JIPipeDynamicParameterCollection |
getScriptParameters() |
boolean |
isCleanUpAfterwards() |
protected void |
onDeserialized(com.fasterxml.jackson.databind.JsonNode node,
JIPipeValidationReport issues,
JIPipeNotificationInbox notifications)
Override this method to add operations to be run after deserialization from JSON
|
void |
reportValidity(JIPipeValidationReportContext reportContext,
JIPipeValidationReport report)
Generates a validity report
|
void |
runParameterSet(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo,
List<JIPipeTextAnnotation> parameterAnnotations)
Runs a parameter set iteration
|
void |
setAnnotationMergeStrategy(JIPipeTextAnnotationMergeMode annotationMergeStrategy) |
void |
setBaseDirectory(Path baseDirectory)
Sets the current work directory of this algorithm.
|
void |
setCleanUpAfterwards(boolean cleanUpAfterwards) |
void |
setCode(PythonScript code) |
void |
setOverrideEnvironment(OptionalPythonEnvironment overrideEnvironment) |
createUIInputSlotIconDescriptionMenuItems, getDataInputSlotCount, getDataInputSlots, getFirstInputSlot, getNonParameterInputSlots, getParameterSlot, getParameterSlotAlgorithmSettings, getUIInputSlotIcon, getUIInputSlotIconBaseDimensions, isParameterUIVisible, onParameterChanged, run
canAutoPassThrough, canPassThrough, functionallyEquals, getDefaultCustomExpressionVariables, getRuntimePartition, isEnabled, isEnableDefaultCustomExpressionVariables, isParameterUIVisible, isPassThrough, isPostprocessor, isPreprocessor, isSkipped, loadExample, runPassThrough, setEnabled, setPassThrough, setRuntimePartition, setSkipped
archiveTo, canUserDelete, clearLocations, clearSlotData, copySlotConfiguration, duplicate, emitNodeSlotsChangedEvent, fromJson, getAliasIdInParentGraph, getBaseDirectory, getBaseDirectoryChangedEventEmitter, getCategory, getCompartmentDisplayName, getCompartmentUUIDInGraphAsString, getCompartmentUUIDInParentGraph, getCustomDescription, getCustomName, getDependencies, getDisplayName, getFirstOutputSlot, getInfo, getInputSlot, getInputSlotMap, getInputSlotOrder, getInputSlots, getInputSlotsWithRole, getInternalStoragePath, getLastInputSlot, getLastOutputSlot, getLocations, getLocationWithin, getName, getNewScratch, getNodeSlotsChangedEventEmitter, getOpenInputSlots, getOutputSlot, getOutputSlotMap, getOutputSlots, getOutputSlotsWithRole, getParentGraph, getProjectCompartment, getProjectDataDirs, getProjectDirectory, getRuntimeProject, getScratchBaseDirectory, getSlotConfiguration, getStoragePath, getTextDescription, getUUIDInParentGraph, hasInputSlot, hasOutputSlot, isBookmarked, isUiLocked, isVisibleIn, onSlotConfigurationChanged, renderInputSlots, renderOutputSlots, setBookmarked, setCustomDescription, setCustomName, setInfo, setInternalStoragePath, setLocations, setLocationWithin, setLocationWithin, setParentGraph, setProjectDirectory, setRuntimeProject, setScratchBaseDirectory, setSlotConfiguration, setStoragePath, setUiLocked, toggleSlot, toJson, updateGraphNodeSlots
getParameterChangedEventEmitter, getParameterStructureChangedEventEmitter, getParameterUIChangedEventEmitter, onParameterStructureChanged, onParameterUIChanged, registerSubParameter, registerSubParameters
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateValidityReport
onParameterUIChanged
onParameterStructureChanged
emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, setParameter
public PythonScriptAlgorithm(JIPipeNodeInfo info)
info
- the infopublic PythonScriptAlgorithm(PythonScriptAlgorithm other)
other
- the infopublic OptionalPythonEnvironment getOverrideEnvironment()
public void setOverrideEnvironment(OptionalPythonEnvironment overrideEnvironment)
public boolean isCleanUpAfterwards()
public void setCleanUpAfterwards(boolean cleanUpAfterwards)
public void getExternalEnvironments(List<JIPipeEnvironment> target)
JIPipeGraphNode
getExternalEnvironments
in class JIPipeGraphNode
target
- the list where the external environments will be gatheredpublic void reportValidity(JIPipeValidationReportContext reportContext, JIPipeValidationReport report)
JIPipeValidatable
reportValidity
in interface JIPipeValidatable
reportValidity
in class JIPipeAlgorithm
reportContext
- the report contextreport
- the report to be added topublic void runParameterSet(JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo, List<JIPipeTextAnnotation> parameterAnnotations)
JIPipeParameterSlotAlgorithm
runParameterSet
in class JIPipeParameterSlotAlgorithm
runContext
- the run contextprogressInfo
- progress info from the runparameterAnnotations
- parameter annotationspublic void setBaseDirectory(Path baseDirectory)
JIPipeGraphNode
JIPipeGraphNode.BaseDirectoryChangedEvent
that can be received by JIPipeDataSlot
instances to adapt to the work directory.setBaseDirectory
in class JIPipeGraphNode
baseDirectory
- The work directory. Can be nullpublic PythonScript getCode()
public void setCode(PythonScript code)
public JIPipeDynamicParameterCollection getScriptParameters()
public JIPipeTextAnnotationMergeMode getAnnotationMergeStrategy()
public void setAnnotationMergeStrategy(JIPipeTextAnnotationMergeMode annotationMergeStrategy)
protected void onDeserialized(com.fasterxml.jackson.databind.JsonNode node, JIPipeValidationReport issues, JIPipeNotificationInbox notifications)
JIPipeGraphNode
onDeserialized
in class JIPipeAlgorithm
node
- the JSON node where the data was loadedissues
- issues during deserialization. if you want to notify the user about potential issues that can be acted upon, use the notification inboxnotifications
- additional notifications for the user. these can be acted uponCopyright © 2020–2024 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.