org.knime.base.node.flowvariable.variableloophead
Class LoopStartVariableNodeModel

java.lang.Object
  extended by org.knime.core.node.NodeModel
      extended by org.knime.base.node.flowvariable.tablerowtovariable.TableToVariableNodeModel
          extended by org.knime.base.node.flowvariable.variableloophead.LoopStartVariableNodeModel
All Implemented Interfaces:
LoopStartNode, LoopStartNodeTerminator

public class LoopStartVariableNodeModel
extends TableToVariableNodeModel
implements LoopStartNodeTerminator

Start of loop: pushes variables in input datatable columns onto stack, taking the values from one row per iteration.

Author:
M. Berthold, University of Konstanz

Constructor Summary
protected LoopStartVariableNodeModel()
          One input, one output.
 
Method Summary
protected  PortObjectSpec[] configure(PortObjectSpec[] inSpecs)
          Configure method for general port types.
protected  PortObject[] execute(PortObject[] inPOs, ExecutionContext exec)
          Execute method for general port types.
protected  void reset()
          Override this function in the derived model and reset your NodeModel.
 boolean terminateLoop()
          
 
Methods inherited from class org.knime.base.node.flowvariable.tablerowtovariable.TableToVariableNodeModel
loadInternals, loadValidatedSettingsFrom, pushVariables, saveInternals, saveSettingsTo, validateSettings
 
Methods inherited from class org.knime.core.node.NodeModel
addWarningListener, configure, continueLoop, execute, executeModel, getInHiLiteHandler, getLoopEndNode, getLoopStartNode, getNrInPorts, getNrOutPorts, getOutHiLiteHandler, getWarningMessage, notifyViews, notifyWarningListeners, peekFlowVariableDouble, peekFlowVariableInt, peekFlowVariableString, peekScopeVariableDouble, peekScopeVariableInt, peekScopeVariableString, pushFlowVariableDouble, pushFlowVariableInt, pushFlowVariableString, pushScopeVariableDouble, pushScopeVariableInt, pushScopeVariableString, removeWarningListener, setInHiLiteHandler, setWarningMessage, stateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoopStartVariableNodeModel

protected LoopStartVariableNodeModel()
One input, one output.

Method Detail

configure

protected PortObjectSpec[] configure(PortObjectSpec[] inSpecs)
                              throws InvalidSettingsException
Configure method for general port types. The argument specs represent the input object specs and are guaranteed to be subclasses of the PortObjectSpecs that are defined through the PortTypes given in the constructor. Similarly, the returned output specs need to comply with their port types spec class (otherwise an error is reported by the framework). They may also be null.

For a general description of the configure method refer to the description of the specialized NodeModel.configure(DataTableSpec[]) methods as it addresses more use cases.

Overrides:
configure in class TableToVariableNodeModel
Parameters:
inSpecs - The input object specs.
Returns:
The output objects specs or null.
Throws:
InvalidSettingsException - If this node can't be configured.

execute

protected PortObject[] execute(PortObject[] inPOs,
                               ExecutionContext exec)
                        throws Exception
Execute method for general port types. The argument objects represent the input objects and are guaranteed to be subclasses of the PortObject classes that are defined through the PortTypes given 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).

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.

Overrides:
execute in class TableToVariableNodeModel
Parameters:
inPOs - The input objects.
exec - For BufferedDataTable creation and progress.
Returns:
The output objects.
Throws:
Exception - If the node execution fails for any reason.

terminateLoop

public boolean terminateLoop()

Specified by:
terminateLoop in interface LoopStartNodeTerminator
Returns:
true if this was the last iteration of the loop, i.e. the tail node must not trigger re-execution of the loop. Some nodes may not be able to provide this and return false all the time. It will be the end node's responsibility to terminate the loop then.

reset

protected void reset()
Override this function in the derived model and reset your NodeModel. All components should unregister themselves from any observables (at least from the hilite handler right now). All internally stored data structures should be released. User settings should not be deleted/reset though.

Overrides:
reset in class TableToVariableNodeModel


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
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.