org.knime.base.node.viz.pie.node.interactive
Class InteractivePieNodeModel

java.lang.Object
  extended by org.knime.core.node.NodeModel
      extended by org.knime.base.node.viz.pie.node.PieNodeModel<InteractivePieVizModel>
          extended by org.knime.base.node.viz.pie.node.interactive.InteractivePieNodeModel

public class InteractivePieNodeModel
extends PieNodeModel<InteractivePieVizModel>

The interactive implementation of the PieNodeModel class.

Author:
Tobias Koetter, University of Konstanz

Field Summary
 
Fields inherited from class org.knime.base.node.viz.pie.node.PieNodeModel
AGGREGATION_COLUMN_FILTER, CFG_DATA_DIR_NAME, CFGKEY_AGGR_COLNAME, CFGKEY_AGGR_METHOD, CFGKEY_ALL_ROWS, CFGKEY_NO_OF_ROWS, CFGKEY_PIE_COLNAME, DEFAULT_NO_OF_ROWS, PIE_COLUMN_FILTER
 
Constructor Summary
protected InteractivePieNodeModel()
          The constructor.
 
Method Summary
protected  DataTableSpec[] configure(PortObjectSpec[] inSpecs)
          Configure method for general port types.
protected  void createModel(ExecutionContext exec, DataColumnSpec pieColSpec, DataColumnSpec aggrColSpec, BufferedDataTable dataTable, int noOfRows, boolean containsColorHandler)
          Called prior #addDataRow(...) method to allow the implementing class the specific model creation.
 InteractivePieVizModel getVizModelInternal()
          
protected  void loadPieInternals(File dataDir, ExecutionMonitor exec)
          Loads the implementation internals.
protected  void resetPieData()
          Resets the implementation internal data.
protected  void savePieInternals(File dataDir, ExecutionMonitor exec)
          Saves the implementation internal data.
 
Methods inherited from class org.knime.base.node.viz.pie.node.PieNodeModel
execute, getAggregationColumnName, getPieColumnName, getVizModel, loadInternals, loadValidatedSettingsFrom, reset, saveInternals, saveSettingsTo, setAggregationColumnName, setPieColumnName, 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

InteractivePieNodeModel

protected InteractivePieNodeModel()
The constructor.

Method Detail

getVizModelInternal

public InteractivePieVizModel getVizModelInternal()
                                           throws TooManySectionsException

Specified by:
getVizModelInternal in class PieNodeModel<InteractivePieVizModel>
Returns:
the PieVizModel. Could be null.
Throws:
TooManySectionsException - if more sections are created than supported

configure

protected DataTableSpec[] 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 PieNodeModel<InteractivePieVizModel>
Parameters:
inSpecs - The input object specs.
Returns:
The output objects specs or null.
Throws:
InvalidSettingsException - If this node can't be configured.

resetPieData

protected void resetPieData()
Resets the implementation internal data.

Specified by:
resetPieData in class PieNodeModel<InteractivePieVizModel>

loadPieInternals

protected void loadPieInternals(File dataDir,
                                ExecutionMonitor exec)
                         throws CanceledExecutionException
Loads the implementation internals.

Specified by:
loadPieInternals in class PieNodeModel<InteractivePieVizModel>
Parameters:
dataDir - the directory load load from
exec - the ExecutionMonitor
Throws:
CanceledExecutionException - if action was canceled

savePieInternals

protected void savePieInternals(File dataDir,
                                ExecutionMonitor exec)
                         throws IOException,
                                CanceledExecutionException
Saves the implementation internal data.

Specified by:
savePieInternals in class PieNodeModel<InteractivePieVizModel>
Parameters:
dataDir - the directory to save to
exec - the ExecutionMonitor
Throws:
IOException - file exception
CanceledExecutionException - action was canceled

createModel

protected void createModel(ExecutionContext exec,
                           DataColumnSpec pieColSpec,
                           DataColumnSpec aggrColSpec,
                           BufferedDataTable dataTable,
                           int noOfRows,
                           boolean containsColorHandler)
                    throws CanceledExecutionException
Called prior #addDataRow(...) method to allow the implementing class the specific model creation.

Specified by:
createModel in class PieNodeModel<InteractivePieVizModel>
Parameters:
exec - the ExecutionMonitor
pieColSpec - the DataColumnSpec of the selected pie column
aggrColSpec - the DataColumnSpec of the selected aggregation column
dataTable - the DataTableSpec
noOfRows - the expected number of rows
containsColorHandler - true if a color handler is set
Throws:
CanceledExecutionException - if the progress was canceled


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.