public abstract class JIPipeMissingDataGeneratorAlgorithm extends JIPipeParameterSlotAlgorithm implements JIPipeParallelizedAlgorithm, JIPipeDataBatchAlgorithm
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.Serializer
JIPipeParameterCollection.ParameterChangedEvent, JIPipeParameterCollection.ParameterStructureChangedEvent, JIPipeParameterCollection.ParameterUIChangedEvent
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 |
---|---|
List<JIPipeMergingDataBatch> |
generateDataBatchesDryRun(List<JIPipeInputDataSlot> slots,
JIPipeProgressInfo progressInfo)
Generates data batches.
|
protected JIPipeDataSlot |
getCorrespondingOutputSlot(JIPipeDataSlot inputSlot)
Gets the output slot that correspond to the input slot.
|
JIPipeMissingDataGeneratorDataBatchGenerationSettings |
getDataBatchGenerationSettings() |
JIPipeDataBatchGenerationSettings |
getGenerationSettingsInterface()
Returns the batch generation settings as interface
|
int |
getParallelizationBatchSize()
Returns how many threads the actual algorithm requires.
|
boolean |
isKeepOriginalAnnotations() |
boolean |
isParallelizationEnabled() |
boolean |
isParameterUIVisible(JIPipeParameterTree tree,
JIPipeParameterAccess access)
Allows to override the visibility of parameters inside the UI
|
protected abstract void |
runGenerator(JIPipeMergingDataBatch dataBatch,
JIPipeDataSlot inputSlot,
JIPipeDataSlot outputSlot,
JIPipeProgressInfo progressInfo)
Generates data and puts the output into the specified output slot
|
protected void |
runIteration(JIPipeMergingDataBatch dataBatch,
JIPipeProgressInfo progressInfo)
Runs code on one data row
|
void |
runParameterSet(JIPipeProgressInfo progressInfo,
List<JIPipeTextAnnotation> parameterAnnotations)
Runs a parameter set iteration
|
void |
setKeepOriginalAnnotations(boolean keepOriginalAnnotations) |
void |
setParallelizationEnabled(boolean parallelizationEnabled)
User-defined parameter to control if parallelization is enabled
|
boolean |
supportsParallelization()
Indicates to the algorithm base implementation if parallelization is supported.
|
getDataInputSlotCount, getDataInputSlots, getFirstInputSlot, getNonParameterInputSlots, getParameterSlot, getParameterSlotAlgorithmSettings, isParameterUIVisible, run
canAutoPassThrough, canPassThrough, functionallyEquals, getThreadPool, isEnabled, isPassThrough, isPostprocessor, isPreprocessor, loadExample, reportValidity, runPassThrough, setEnabled, setPassThrough, setThreadPool
archiveTo, canUserDelete, clearLocations, clearSlotData, copySlotConfiguration, duplicate, fromJson, fromJsonNode, getAliasIdInParentGraph, getBaseDirectory, getCategory, getCompartmentDisplayName, getCompartmentUUIDInGraphAsString, getCompartmentUUIDInParentGraph, getCustomDescription, getDependencies, getDisplayName, getEventBus, getFirstOutputSlot, getInfo, getInputSlot, getInputSlotMap, getInputSlotOrder, getInputSlots, getInputSlotsWithRole, getInternalStoragePath, getLastInputSlot, getLastOutputSlot, getLocations, getLocationWithin, getName, getNewScratch, getOpenInputSlots, getOutputSlot, getOutputSlotMap, getOutputSlots, getOutputSlotsWithRole, getParentGraph, getProjectCompartment, getProjectDirectory, getScratchBaseDirectory, getSlotConfiguration, getStoragePath, getUUIDInParentGraph, hasInputSlot, hasOutputSlot, isBookmarked, isVisibleIn, onDeserialized, onParameterChanged, onParameterStructureChanged, onParameterUIChanged, onSlotConfigurationChanged, registerSubParameter, renderInputSlots, renderOutputSlots, setBaseDirectory, setBookmarked, setCustomDescription, setCustomName, setInfo, setInternalStoragePath, setLocations, setLocationWithin, setLocationWithin, setParentGraph, setProjectDirectory, setScratchBaseDirectory, setSlotConfiguration, setStoragePath, toggleSlot, toJson, triggerSlotsChangedEvent, updateGraphNodeSlots
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
generateValidityReport
addParameterChangeListener, addParameterChangeListener, getContextActions, getParameter, getParameterAccess, installUIOverrideParameterEditor, installUIParameterOptions, setParameter, triggerParameterChange, triggerParameterStructureChange, triggerParameterUIChange
public JIPipeMissingDataGeneratorAlgorithm(JIPipeNodeInfo info, JIPipeSlotConfiguration slotConfiguration)
info
- Algorithm infoslotConfiguration
- Slot configuration overridepublic JIPipeMissingDataGeneratorAlgorithm(JIPipeNodeInfo info)
info
- Algorithm infopublic JIPipeMissingDataGeneratorAlgorithm(JIPipeMissingDataGeneratorAlgorithm other)
other
- The originalpublic JIPipeDataBatchGenerationSettings getGenerationSettingsInterface()
JIPipeDataBatchAlgorithm
getGenerationSettingsInterface
in interface JIPipeDataBatchAlgorithm
public List<JIPipeMergingDataBatch> generateDataBatchesDryRun(List<JIPipeInputDataSlot> slots, JIPipeProgressInfo progressInfo)
JIPipeDataBatchAlgorithm
generateDataBatchesDryRun
in interface JIPipeDataBatchAlgorithm
slots
- the data slotsprogressInfo
- the progresspublic void runParameterSet(JIPipeProgressInfo progressInfo, List<JIPipeTextAnnotation> parameterAnnotations)
JIPipeParameterSlotAlgorithm
runParameterSet
in class JIPipeParameterSlotAlgorithm
progressInfo
- 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 JIPipeMissingDataGeneratorDataBatchGenerationSettings getDataBatchGenerationSettings()
public boolean supportsParallelization()
JIPipeParallelizedAlgorithm
supportsParallelization
in interface JIPipeParallelizedAlgorithm
public int getParallelizationBatchSize()
JIPipeParallelizedAlgorithm
getParallelizationBatchSize
in interface JIPipeParallelizedAlgorithm
public boolean isParallelizationEnabled()
isParallelizationEnabled
in interface JIPipeParallelizedAlgorithm
public void setParallelizationEnabled(boolean parallelizationEnabled)
JIPipeParallelizedAlgorithm
setParallelizationEnabled
in interface JIPipeParallelizedAlgorithm
parallelizationEnabled
- if parallelization is enabledpublic boolean isKeepOriginalAnnotations()
public void setKeepOriginalAnnotations(boolean keepOriginalAnnotations)
protected void runIteration(JIPipeMergingDataBatch dataBatch, JIPipeProgressInfo progressInfo)
dataBatch
- The data interfaceprogressInfo
- the progress info from the runprotected JIPipeDataSlot getCorrespondingOutputSlot(JIPipeDataSlot inputSlot)
inputSlot
- the input slotprotected abstract void runGenerator(JIPipeMergingDataBatch dataBatch, JIPipeDataSlot inputSlot, JIPipeDataSlot outputSlot, JIPipeProgressInfo progressInfo)
dataBatch
- 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–2023 Leibniz Institute for Natural Product Research and Infection Biology - Hans Knöll Institute (HKI). All rights reserved.