public abstract class JIPipeIteratingAlgorithm extends JIPipeParameterSlotAlgorithm implements JIPipeParallelizedAlgorithm, JIPipeIterationStepAlgorithm, JIPipeAdaptiveParametersAlgorithm
JIPipeAlgorithm
that iterates through each data row.
This algorithm utilizes the JIPipeSingleIterationStep
class to iterate through input data sets.
It offers various parameters that control how data sets are matched.
If your algorithm only has one input and will never have more than one input slot, we recommend using JIPipeSimpleIteratingAlgorithm
instead that comes without the additional data set matching strategiesJIPipeGraphNode.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 |
---|
JIPipeIteratingAlgorithm(JIPipeIteratingAlgorithm other)
Copies the algorithm
|
JIPipeIteratingAlgorithm(JIPipeNodeInfo info)
Creates a new instance
|
JIPipeIteratingAlgorithm(JIPipeNodeInfo info,
JIPipeSlotConfiguration slotConfiguration)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
void |
createUIInputSlotIconDescriptionMenuItems(String slotName,
List<ViewOnlyMenuItem> target)
Explanations added to the slot menu
Can be null
|
JIPipeDataBatchGenerationResult |
generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots,
JIPipeProgressInfo progressInfo)
Generates iteration steps.
|
JIPipeAdaptiveParameterSettings |
getAdaptiveParameterSettings() |
JIPipeIteratingAlgorithmIterationStepGenerationSettings |
getDataBatchGenerationSettings() |
JIPipeIterationStepGenerationSettings |
getGenerationSettingsInterface()
Returns the batch generation settings as interface
|
int |
getParallelizationBatchSize()
Returns how many threads the actual algorithm requires.
|
protected boolean |
isAllowEmptyIterationStep()
If true, allow the execution of an empty iteration step if all inputs are optional and are empty
|
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
|
protected abstract void |
runIteration(JIPipeSingleIterationStep iterationStep,
JIPipeIterationContext iterationContext,
JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo)
Runs code on one data row
|
void |
runParameterSet(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo,
List<JIPipeTextAnnotation> parameterAnnotations)
Runs a parameter set iteration
|
protected void |
runPassThrough(JIPipeProgressInfo progressInfo,
JIPipeSingleIterationStep iterationStep)
A pass-through variant for iterating algorithms.
|
boolean |
supportsParallelization()
Indicates to the algorithm base implementation if parallelization is supported.
|
getDataInputSlotCount, getDataInputSlots, getFirstInputSlot, getNonParameterInputSlots, getParameterSlot, getParameterSlotAlgorithmSettings, getUIInputSlotIcon, getUIInputSlotIconBaseDimensions, onParameterChanged, run
canAutoPassThrough, canPassThrough, functionallyEquals, getDefaultCustomExpressionVariables, getRuntimePartition, isEnabled, isEnableDefaultCustomExpressionVariables, isPassThrough, isPostprocessor, isPreprocessor, isSkipped, loadExample, onDeserialized, reportValidity, runPassThrough, setEnabled, setPassThrough, setRuntimePartition, setSkipped
archiveTo, canUserDelete, clearLocations, clearSlotData, copySlotConfiguration, duplicate, emitNodeSlotsChangedEvent, fromJson, getAliasIdInParentGraph, getBaseDirectory, getBaseDirectoryChangedEventEmitter, getCategory, getCompartmentDisplayName, getCompartmentUUIDInGraphAsString, getCompartmentUUIDInParentGraph, getCustomDescription, getCustomName, getDependencies, getDisplayName, getEnvironmentDependencies, 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, getUUIDInParentGraph, hasInputSlot, hasOutputSlot, isBookmarked, isUiLocked, isVisibleIn, 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
generateDataBatchesDryRun
installUIOverrideParameterEditor, installUIParameterOptions
deserializeFromJsonNode, emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, getParameterChangedEventEmitter, getParameterStructureChangedEventEmitter, getParameterUIChangedEventEmitter, serializeToJsonFile, serializeToJsonGenerator, serializeToJsonString, setParameter
generateValidityReport
onParameterUIChanged
onParameterStructureChanged
public JIPipeIteratingAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- Algorithm infoslotConfiguration
- Slot configuration overridepublic JIPipeIteratingAlgorithm(JIPipeNodeInfo info)
info
- Algorithm infopublic JIPipeIteratingAlgorithm(JIPipeIteratingAlgorithm other)
other
- The originalpublic JIPipeIterationStepGenerationSettings getGenerationSettingsInterface()
JIPipeIterationStepAlgorithm
getGenerationSettingsInterface
in interface JIPipeIterationStepAlgorithm
public JIPipeDataBatchGenerationResult generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots, JIPipeProgressInfo progressInfo)
JIPipeIterationStepAlgorithm
generateDataBatchesGenerationResult
in interface JIPipeIterationStepAlgorithm
slots
- the data slotsprogressInfo
- the progresspublic void createUIInputSlotIconDescriptionMenuItems(String slotName, List<ViewOnlyMenuItem> target)
JIPipeGraphNode
createUIInputSlotIconDescriptionMenuItems
in class JIPipeParameterSlotAlgorithm
slotName
- the slot nametarget
- the list of menu itemsprotected void runPassThrough(JIPipeProgressInfo progressInfo, JIPipeSingleIterationStep iterationStep)
progressInfo
- progress infoiterationStep
- the iteration stepprotected boolean isAllowEmptyIterationStep()
public 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 JIPipeAdaptiveParameterSettings getAdaptiveParameterSettings()
getAdaptiveParameterSettings
in interface JIPipeAdaptiveParametersAlgorithm
public JIPipeIteratingAlgorithmIterationStepGenerationSettings getDataBatchGenerationSettings()
public boolean supportsParallelization()
JIPipeParallelizedAlgorithm
supportsParallelization
in interface JIPipeParallelizedAlgorithm
public int getParallelizationBatchSize()
JIPipeParallelizedAlgorithm
getParallelizationBatchSize
in interface JIPipeParallelizedAlgorithm
public boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterCollection subParameter)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeParameterSlotAlgorithm
tree
- the parameter tree that is used to access this parametersubParameter
- a sub parameterpublic boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterAccess access)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeAlgorithm
tree
- the parameter tree that is used to access this parameteraccess
- the parameterprotected abstract void runIteration(JIPipeSingleIterationStep iterationStep, JIPipeIterationContext iterationContext, JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo)
iterationStep
- The data interfaceiterationContext
- The iteration contextrunContext
- the run contextprogressInfo
- the progress info from the runCopyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.