public abstract class JIPipeMissingDataGeneratorAlgorithm extends JIPipeParameterSlotAlgorithm implements JIPipeParallelizedAlgorithm, JIPipeIterationStepAlgorithm
JIPipeAlgorithm
that passes incoming data to their corresponding output slots if the data batch is complete
and otherwise runs a generator function that generates missing data items.
Original annotations are preserved.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 |
---|
JIPipeMissingDataGeneratorAlgorithm(JIPipeMissingDataGeneratorAlgorithm other)
Copies the algorithm
|
JIPipeMissingDataGeneratorAlgorithm(JIPipeNodeInfo info)
Creates a new instance
|
JIPipeMissingDataGeneratorAlgorithm(JIPipeNodeInfo info,
JIPipeSlotConfiguration slotConfiguration)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
JIPipeDataBatchGenerationResult |
generateDataBatchesGenerationResult(List<JIPipeInputDataSlot> slots,
JIPipeProgressInfo progressInfo)
Generates data batches.
|
protected JIPipeOutputDataSlot |
getCorrespondingOutputSlot(JIPipeDataSlot inputSlot)
Gets the output slot that correspond to the input slot.
|
JIPipeMissingDataGeneratorIterationStepGenerationSettings |
getDataBatchGenerationSettings() |
JIPipeIterationStepGenerationSettings |
getGenerationSettingsInterface()
Returns the batch generation settings as interface
|
int |
getParallelizationBatchSize()
Returns how many threads the actual algorithm requires.
|
boolean |
isKeepOriginalAnnotations() |
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
protected abstract void |
runGenerator(JIPipeMultiIterationStep iterationStep,
JIPipeInputDataSlot inputSlot,
JIPipeOutputDataSlot outputSlot,
JIPipeProgressInfo progressInfo)
Generates data and puts the output into the specified output slot
|
protected void |
runIteration(JIPipeMultiIterationStep iterationStep,
JIPipeIterationContext iterationContext,
JIPipeProgressInfo progressInfo)
Runs code on one data row
|
void |
runParameterSet(JIPipeGraphNodeRunContext runContext,
JIPipeProgressInfo progressInfo,
List<JIPipeTextAnnotation> parameterAnnotations)
Runs a parameter set iteration
|
void |
setKeepOriginalAnnotations(boolean keepOriginalAnnotations) |
boolean |
supportsParallelization()
Indicates to the algorithm base implementation if parallelization is supported.
|
createUIInputSlotIconDescriptionMenuItems, getDataInputSlotCount, getDataInputSlots, getFirstInputSlot, getNonParameterInputSlots, getParameterSlot, getParameterSlotAlgorithmSettings, getUIInputSlotIcon, getUIInputSlotIconBaseDimensions, isParameterUIVisible, 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, getExternalEnvironments, 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, setBaseDirectory, 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
generateDataBatchesDryRun
generateValidityReport
onParameterUIChanged
onParameterStructureChanged
emitParameterChangedEvent, emitParameterStructureChangedEvent, emitParameterUIChangedEvent, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, setParameter
public JIPipeMissingDataGeneratorAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- Algorithm infoslotConfiguration
- Slot configuration overridepublic JIPipeMissingDataGeneratorAlgorithm(JIPipeNodeInfo info)
info
- Algorithm infopublic JIPipeMissingDataGeneratorAlgorithm(JIPipeMissingDataGeneratorAlgorithm 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 runParameterSet(JIPipeGraphNodeRunContext runContext, JIPipeProgressInfo progressInfo, List<JIPipeTextAnnotation> parameterAnnotations)
JIPipeParameterSlotAlgorithm
runParameterSet
in class JIPipeParameterSlotAlgorithm
runContext
- the run contextprogressInfo
- progress info from the runparameterAnnotations
- parameter annotationspublic 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 JIPipeMissingDataGeneratorIterationStepGenerationSettings getDataBatchGenerationSettings()
public boolean supportsParallelization()
JIPipeParallelizedAlgorithm
supportsParallelization
in interface JIPipeParallelizedAlgorithm
public int getParallelizationBatchSize()
JIPipeParallelizedAlgorithm
getParallelizationBatchSize
in interface JIPipeParallelizedAlgorithm
public boolean isKeepOriginalAnnotations()
public void setKeepOriginalAnnotations(boolean keepOriginalAnnotations)
protected void runIteration(JIPipeMultiIterationStep iterationStep, JIPipeIterationContext iterationContext, JIPipeProgressInfo progressInfo)
iterationStep
- The data interfaceiterationContext
- The iteration contextprogressInfo
- the progress info from the runprotected JIPipeOutputDataSlot getCorrespondingOutputSlot(JIPipeDataSlot inputSlot)
inputSlot
- the input slotprotected abstract void runGenerator(JIPipeMultiIterationStep iterationStep, JIPipeInputDataSlot inputSlot, JIPipeOutputDataSlot outputSlot, JIPipeProgressInfo progressInfo)
iterationStep
- the data batchinputSlot
- the input slot that should be generated. Please note that it does not contain any data for this batch.outputSlot
- the output slot where data should be put.progressInfo
- the progress infoCopyright © 2020–2024 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.