public class DataValidatorSpecNodeModel extends DataValidatorNodeModel
|Constructor and Description|
|Modifier and Type||Method and Description|
This function is called whenever the derived model should re-configure and generate the expected output specs.
Execute method for general port types.
getConfig, loadInternals, loadValidatedSettingsFrom, reset, saveInternals, saveSettingsTo, validateSettings
addWarningListener, computeFinalOutputSpecs, configure, continueLoop, createInitialStreamableOperatorInternals, createMergeOperator, createStreamableOperator, execute, finishStreamableExecution, getAvailableFlowVariables, getAvailableInputFlowVariables, getCredentialsProvider, getInHiLiteHandler, getInPortType, getInputPortRoles, getInteractiveNodeView, getLogger, getLoopEndNode, getLoopStartNode, getNrInPorts, getNrOutPorts, getOutHiLiteHandler, getOutPortType, getOutputPortRoles, getWarningMessage, iterate, notifyViews, notifyWarningListeners, onDispose, peekFlowVariableDouble, peekFlowVariableInt, peekFlowVariableString, pushFlowVariableDouble, pushFlowVariableInt, pushFlowVariableString, removeWarningListener, resetAndConfigureLoopBody, setInHiLiteHandler, setWarningMessage, stateChanged
protected DataTableSpec configure(DataTableSpec inSpecs) throws InvalidSettingsException
For ordinary(*) nodes the passed DataTableSpec elements are never
null but can be empty. The model
null data table spec(s) for the outputs. Note, after the model has been executed this
function will not be called anymore, as the output DataTableSpecs are then being pulled from the output
DataTables. A derived
NodeModel that cannot provide any DataTableSpecs at its outputs before
execution (because the table structure is unknown at this point) can return an array containing just
null elements. As an example consider a "Transpose" node that flips columns to rows -- there is no
way to determine the table spec at time of configuration as the number of rows (which is the number of new
columns at the output) is unknown though the node is still executable.
(*)For nodes that support optional inputs or may have inactive outputs it's better to override
Implementation note: This method is called from the
NodeModel.configure(PortObjectSpec) method unless that
method is overwritten.
inSpecs- The input data table specs (as many as this model has inputs). Do NOT modify the contents of this array. If no spec is available for any given port (because the port is not connected or the previous node does not produce a spec) the framework will pass an empty
DataTableSpec(no columns) unless the port is marked as
optional(in which case the array element is null).
nullDataTableSpec elements are changed to empty once.
InvalidSettingsException- if the
#configure()failed, that is, the settings are inconsistent with given DataTableSpec elements.
protected PortObject execute(PortObject inData, ExecutionContext exec) throws Exception
inObjectsrepresent the input objects and the returned array represents the output objects. The elements in the argument array are generally guaranteed to be not null and subclasses of the
PortObject classesthat are defined through the
PortTypesgiven in the
constructor. Similarly, the returned output objects need to comply with their port types object class (otherwise an error is reported by the framework) and must not be null. There are few exceptions to these rules:
InactiveBranchConsumermay find instances of
InactiveBranchPortObjectin case the corresponding input is inactive.
InactiveBranchPortObjectelements in case the output should be inactivated.
For a general description of the execute method refer to the description of the specialized
NodeModel.execute(BufferedDataTable, ExecutionContext) methods as it addresses more use cases.
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.