public abstract class JIPipeParameterlessSimpleIteratingAlgorithm extends JIPipeAlgorithm implements JIPipeParallelizedAlgorithm, JIPipeIterationStepAlgorithm
JIPipeAlgorithm
that iterates through each data row.
This is a simplified version of JIPipeIteratingAlgorithm
that assumes that there is only one or zero input slots.
An error is thrown if there are more than one input slots.Modifier and Type | Class and Description |
---|---|
static class |
JIPipeParameterlessSimpleIteratingAlgorithm.IterationStepGenerationSettings |
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 |
---|
JIPipeParameterlessSimpleIteratingAlgorithm(JIPipeNodeInfo info)
Creates a new instance
|
JIPipeParameterlessSimpleIteratingAlgorithm(JIPipeNodeInfo info,
JIPipeSlotConfiguration slotConfiguration)
Creates a new instance
|
JIPipeParameterlessSimpleIteratingAlgorithm(JIPipeParameterlessSimpleIteratingAlgorithm other)
Copies the algorithm
|
Modifier and Type | Method and Description |
---|---|
JIPipeDataBatchGenerationResult |
generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots,
JIPipeProgressInfo progressInfo)
Generates iteration steps.
|
JIPipeParameterlessSimpleIteratingAlgorithm.IterationStepGenerationSettings |
getDataBatchGenerationSettings() |
JIPipeIterationStepGenerationSettings |
getGenerationSettingsInterface()
Returns the batch generation settings as interface
|
int |
getParallelizationBatchSize()
Returns how many threads the actual algorithm requires.
|
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
|
void |
reportValidity(JIPipeValidationReportContext reportContext,
JIPipeValidationReport report)
Generates a validity report
|
void |
run(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo)
Runs the workload
|
protected abstract void |
runIteration(JIPipeSingleIterationStep iterationStep,
JIPipeIterationContext iterationContext,
JIPipeProgressInfo progressInfo)
Runs code on one data row
|
boolean |
supportsParallelization()
Indicates to the algorithm base implementation if parallelization is supported.
|
canAutoPassThrough, canPassThrough, functionallyEquals, getDefaultCustomExpressionVariables, getRuntimePartition, isEnabled, isEnableDefaultCustomExpressionVariables, isPassThrough, isPostprocessor, isPreprocessor, isSkipped, loadExample, onDeserialized, runPassThrough, setEnabled, setPassThrough, setRuntimePartition, setSkipped
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
generateDataBatchesDryRun
generateValidityReport
onParameterUIChanged
onParameterStructureChanged
deserializeFromJsonNode, emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, serializeToJsonFile, serializeToJsonGenerator, serializeToJsonString, setParameter
public JIPipeParameterlessSimpleIteratingAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- Algorithm infoslotConfiguration
- Slot configuration overridepublic JIPipeParameterlessSimpleIteratingAlgorithm(JIPipeNodeInfo info)
info
- Algorithm infopublic JIPipeParameterlessSimpleIteratingAlgorithm(JIPipeParameterlessSimpleIteratingAlgorithm other)
other
- The originalpublic void run(JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo)
JIPipeGraphNode
run
in class JIPipeAlgorithm
runContext
- the context of the run processprogressInfo
- progress passed from the runnerpublic void reportValidity(JIPipeValidationReportContext reportContext, JIPipeValidationReport report)
JIPipeValidatable
reportValidity
in interface JIPipeValidatable
reportValidity
in class JIPipeAlgorithm
reportContext
- the report contextreport
- the report to be added toprotected abstract void runIteration(JIPipeSingleIterationStep iterationStep, JIPipeIterationContext iterationContext, JIPipeProgressInfo progressInfo)
iterationStep
- The data interfaceiterationContext
- The iteration contextprogressInfo
- the progress info from the runpublic boolean supportsParallelization()
JIPipeParallelizedAlgorithm
supportsParallelization
in interface JIPipeParallelizedAlgorithm
public int getParallelizationBatchSize()
JIPipeParallelizedAlgorithm
getParallelizationBatchSize
in interface JIPipeParallelizedAlgorithm
public JIPipeParameterlessSimpleIteratingAlgorithm.IterationStepGenerationSettings getDataBatchGenerationSettings()
public JIPipeIterationStepGenerationSettings getGenerationSettingsInterface()
JIPipeIterationStepAlgorithm
getGenerationSettingsInterface
in interface JIPipeIterationStepAlgorithm
public boolean isParameterUIVisible(JIPipeParameterTree tree, JIPipeParameterCollection subParameter)
JIPipeParameterCollection
isParameterUIVisible
in interface JIPipeParameterCollection
isParameterUIVisible
in class JIPipeAlgorithm
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 parameterpublic JIPipeDataBatchGenerationResult generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots, JIPipeProgressInfo progressInfo)
JIPipeIterationStepAlgorithm
generateDataBatchesGenerationResult
in interface JIPipeIterationStepAlgorithm
slots
- the data slotsprogressInfo
- the progressCopyright © 2020–2025 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.