public abstract class JIPipeAlgorithm extends JIPipeGraphNode
JIPipeGraphNode
that contains a non-empty workload.
This class contains additional parameters to control the workload behavior.
Please prefer to use this class or its derivatives if you write your algorithms.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
Constructor and Description |
---|
JIPipeAlgorithm(JIPipeAlgorithm other)
Creates a copy
|
JIPipeAlgorithm(JIPipeNodeInfo info)
Initializes a new node type instance
|
JIPipeAlgorithm(JIPipeNodeInfo info,
JIPipeSlotConfiguration slotConfiguration)
Initializes a new node type instance and sets a custom slot configuration
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canAutoPassThrough()
Returns true if the algorithm can automatically apply pass-through
This is only possible if there is at most one input and at most one output.
|
boolean |
canPassThrough()
Returns true if the algorithm can apply pass-through.
|
boolean |
functionallyEquals(Object other)
Returns true if this node and the other node are functionally equal (i.e. they have the same functional parameters).
|
JIPipeCustomExpressionVariablesParameter |
getDefaultCustomExpressionVariables() |
RuntimePartitionReferenceParameter |
getRuntimePartition() |
boolean |
isEnabled() |
boolean |
isEnableDefaultCustomExpressionVariables()
Returns true if the default custom expression variables are shown in the UI
(defaults to true)
|
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterCollection subParameter)
Allows to override the visibility of sub-parameters inside the UI
|
boolean |
isPassThrough() |
boolean |
isPostprocessor()
Indicates if the node should be run after all other nodes.
|
boolean |
isPreprocessor()
Indicates if the node should be run before all other nodes.
|
boolean |
isSkipped()
Used internally to mark an algorithm as (not) executed without triggering isFunctionallyEquals()
Affects
JIPipeGraph 's getDeactivatedNodes
This is not serialized, but copied |
void |
loadExample(JIPipeNodeExample example)
Loads an example.
|
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 |
run(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo)
Runs the workload
|
protected void |
runPassThrough(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo)
Runs the pass through.
|
void |
setEnabled(boolean enabled) |
void |
setPassThrough(boolean passThrough) |
void |
setRuntimePartition(RuntimePartitionReferenceParameter runtimePartition) |
void |
setSkipped(boolean skipped)
Used internally to mark an algorithm as (not) executed without triggering isFunctionallyEquals()
Affects
JIPipeGraph 's getDeactivatedNodes
This is not serialized, but copied |
archiveTo, canUserDelete, clearLocations, clearSlotData, copySlotConfiguration, createUIInputSlotIconDescriptionMenuItems, duplicate, emitNodeSlotsChangedEvent, fromJson, getAliasIdInParentGraph, getBaseDirectory, getBaseDirectoryChangedEventEmitter, getCategory, getCompartmentDisplayName, getCompartmentUUIDInGraphAsString, getCompartmentUUIDInParentGraph, getCustomDescription, getCustomName, getDataInputSlots, getDependencies, getDisplayName, getEnvironmentDependencies, getFirstInputSlot, getFirstOutputSlot, getInfo, getInputSlot, getInputSlotMap, getInputSlotOrder, getInputSlots, getInputSlotsWithRole, getInternalStoragePath, getLastInputSlot, getLastOutputSlot, getName, getNewScratch, getNodeSlotsChangedEventEmitter, getNodeUILocationPerViewModePerCompartment, getNodeUILocationWithin, getOpenInputSlots, getOutputSlot, getOutputSlotMap, getOutputSlots, getOutputSlotsWithRole, getParentGraph, getProject, getProjectCompartment, getProjectDataDirs, getProjectDirectory, getRuntimeProject, getScratchBaseDirectory, getSlotConfiguration, getStoragePath, getTextDescription, getUIInputSlotIcon, getUIInputSlotIconBaseDimensions, getUUIDInParentGraph, hasInputSlot, hasOutputSlot, isBookmarked, isUiLocked, isVisibleIn, onParameterChanged, onSlotConfigurationChanged, renderInputSlots, renderOutputSlots, setBaseDirectory, setBookmarked, setCustomDescription, setCustomName, setInfo, setInternalStoragePath, setNodeUILocationPerViewModePerCompartment, setNodeUILocationWithin, setNodeUILocationWithin, 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
deserializeFromJsonNode, emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, serializeToJsonFile, serializeToJsonGenerator, serializeToJsonString, setParameter
public JIPipeAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- The algorithm infoslotConfiguration
- The slot configurationpublic JIPipeAlgorithm(JIPipeNodeInfo info)
info
- The algorithm infopublic JIPipeAlgorithm(JIPipeAlgorithm other)
other
- the originalpublic void run(JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo)
JIPipeGraphNode
run
in class JIPipeGraphNode
runContext
- the context of the run processprogressInfo
- progress passed from the runnerpublic void reportValidity(JIPipeValidationReportContext reportContext, JIPipeValidationReport report)
JIPipeValidatable
reportContext
- the report contextreport
- the report to be added toprotected void runPassThrough(JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo)
runContext
- the context of the running operationprogressInfo
- the progressprotected boolean canAutoPassThrough()
public boolean canPassThrough()
public boolean isSkipped()
JIPipeGraph
's getDeactivatedNodes
This is not serialized, but copiedpublic void setSkipped(boolean skipped)
JIPipeGraph
's getDeactivatedNodes
This is not serialized, but copiedskipped
- if the node should be skipped in the next runspublic boolean isEnabled()
public void setEnabled(boolean enabled)
public RuntimePartitionReferenceParameter getRuntimePartition()
public void setRuntimePartition(RuntimePartitionReferenceParameter runtimePartition)
public boolean isPassThrough()
public void setPassThrough(boolean passThrough)
public JIPipeCustomExpressionVariablesParameter getDefaultCustomExpressionVariables()
protected void onDeserialized(com.fasterxml.jackson.databind.JsonNode node, JIPipeValidationReport issues, JIPipeNotificationInbox notifications)
JIPipeGraphNode
onDeserialized
in class JIPipeGraphNode
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 uponpublic boolean isEnableDefaultCustomExpressionVariables()
public boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterAccess access)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeGraphNode
tree
- the parameter tree that is used to access this parameteraccess
- the parameterpublic boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterCollection subParameter)
JIPipeParameterCollection
tree
- the parameter tree that is used to access this parametersubParameter
- a sub parameterpublic boolean functionallyEquals(Object other)
JIPipeGraphNode
JIPipeNodeInfo
is equalfunctionallyEquals
in interface JIPipeFunctionallyComparable
functionallyEquals
in class JIPipeGraphNode
other
- the other nodepublic boolean isPreprocessor()
public boolean isPostprocessor()
public void loadExample(JIPipeNodeExample example)
example
- the exampleCopyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.