org.knime.core.node
Class NodePersistorVersion200

java.lang.Object
  extended by org.knime.core.node.NodePersistorVersion1xx
      extended by org.knime.core.node.NodePersistorVersion200
All Implemented Interfaces:
NodeContentPersistor, NodePersistor

public class NodePersistorVersion200
extends NodePersistorVersion1xx

Author:
wiswedel, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.NodePersistor
NodePersistor.LoadNodeModelSettingsFailPolicy
 
Field Summary
static String INTERNAL_TABLE_FOLDER_PREFIX
          Prefix of associated port folders.
static String PORT_FOLDER_PREFIX
          Prefix of associated port folders.
 
Fields inherited from class org.knime.core.node.NodePersistorVersion1xx
OLD_AUTOEXECUTABLE_NODEFACTORIES
 
Fields inherited from interface org.knime.core.node.NodePersistor
CFG_DATA_FILE, CFG_DATA_FILE_DIR, CFG_HAS_SPEC_FILE, CFG_ISCONFIGURED, CFG_ISEXECUTED, CFG_MEMORY_POLICY, CFG_MODEL_FILES, CFG_NAME, CFG_NODE_MESSAGE, CFG_OUTPUT_PREFIX, CFG_SPEC_FILES, DATA_FILE_DIR, DATA_FILE_PREFIX, INTERN_FILE_DIR, MODEL_FILE_PREFIX, SETTINGS_FILE_NAME
 
Constructor Summary
NodePersistorVersion200(SingleNodeContainerPersistorVersion200 sncPersistor, WorkflowPersistorVersion200.LoadVersion loadVersion)
          Invokes super constructor.
 
Method Summary
 NodePersistor.LoadNodeModelSettingsFailPolicy getModelSettingsFailPolicy()
          
protected  boolean loadHasContent(NodeSettingsRO settings)
          
protected  void loadInternalHeldTables(Node node, ExecutionMonitor execMon, NodeSettingsRO settings, Map<Integer,BufferedDataTable> loadTblRep, HashMap<Integer,ContainerTable> tblRep)
          Sub class hook to read internal tables.
protected  boolean loadIsConfigured(NodeSettingsRO settings)
          
protected  boolean loadIsExecuted(NodeSettingsRO settings)
          
protected  boolean loadIsInactive(NodeSettingsRO settings)
          
protected  void loadPort(Node node, ReferencedFile portDir, NodeSettingsRO settings, ExecutionMonitor exec, int portIdx, Map<Integer,BufferedDataTable> loadTblRep, HashMap<Integer,ContainerTable> tblRep)
           
protected  int loadPortIndex(NodeSettingsRO singlePortSetting)
           
protected  void loadPorts(Node node, ExecutionMonitor exec, NodeSettingsRO settings, Map<Integer,BufferedDataTable> loadTblRep, HashMap<Integer,ContainerTable> tblRep)
          
protected  String loadWarningMessage(NodeSettingsRO settings)
          Sub class hook to read warning message.
static void save(SingleNodeContainer snc, ReferencedFile nodeFile, ExecutionMonitor execMon, boolean isSaveData)
          Saves the node, node settings, and all internal structures, spec, data, and models, to the given node directory (located at the node file).
protected static void saveCustomName(Node node, NodeSettingsWO settings)
           
protected static void saveHasContent(Node node, NodeSettingsWO settings)
           
protected static void saveInternalHeldTables(Node node, ReferencedFile nodeDirRef, NodeSettingsWO settings, ExecutionMonitor exec, boolean saveData)
           
protected static void saveIsInactive(Node node, NodeSettingsWO settings)
           
protected static void saveNodeInternDirectory(Node node, File nodeInternDir, NodeSettingsWO settings, ExecutionMonitor exec)
          Sub-class hook to save location of internal directory.
protected static void savePort(Node node, File portDir, NodeSettingsWO settings, ExecutionMonitor exec, int portIdx, boolean saveData)
           
protected static void savePorts(Node node, ReferencedFile nodeDirRef, NodeSettingsWO settings, ExecutionMonitor exec, boolean saveData)
           
protected static void saveWarningMessage(Node node, NodeSettingsWO settings)
           
 
Methods inherited from class org.knime.core.node.NodePersistorVersion1xx
createDataFileDirName, createModelFileName, getInternalHeldTables, getLoadHelper, getLoadVersion, getLogger, getNodeDirectory, getNodeInternDirectory, getNodeInternDirectory, getPortObject, getPortObjectSpec, getPortObjectSummary, getSettings, getSingleNodeContainerPersistor, getWarningMessage, hasContent, isConfigured, isDirtyAfterLoad, isExecuted, isInactive, load, loadNodeInternDirectory, mustWarnOnDataLoadError, needsResetAfterLoad, setDirtyAfterLoad, setInternalHeldTables, setNeedsResetAfterLoad, setPortObject, setPortObjectSpec, setPortObjectSummary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT_FOLDER_PREFIX

public static final String PORT_FOLDER_PREFIX
Prefix of associated port folders. (Also used in export wizard, public declaration here.)

See Also:
Constant Field Values

INTERNAL_TABLE_FOLDER_PREFIX

public static final String INTERNAL_TABLE_FOLDER_PREFIX
Prefix of associated port folders. (Also used in export wizard, public declaration here.)

See Also:
Constant Field Values
Constructor Detail

NodePersistorVersion200

public NodePersistorVersion200(SingleNodeContainerPersistorVersion200 sncPersistor,
                               WorkflowPersistorVersion200.LoadVersion loadVersion)
Invokes super constructor.

Parameters:
sncPersistor - Forwarded.
loadVersion - Version, must not be null.
Method Detail

save

public static void save(SingleNodeContainer snc,
                        ReferencedFile nodeFile,
                        ExecutionMonitor execMon,
                        boolean isSaveData)
                 throws IOException,
                        CanceledExecutionException
Saves the node, node settings, and all internal structures, spec, data, and models, to the given node directory (located at the node file).

Parameters:
nodeFile - To write node settings to.
execMon - Used to report progress during saving.
Throws:
IOException - If the node file can't be found or read.
CanceledExecutionException - If the saving has been canceled.

savePorts

protected static void savePorts(Node node,
                                ReferencedFile nodeDirRef,
                                NodeSettingsWO settings,
                                ExecutionMonitor exec,
                                boolean saveData)
                         throws IOException,
                                CanceledExecutionException
Throws:
IOException
CanceledExecutionException

saveInternalHeldTables

protected static void saveInternalHeldTables(Node node,
                                             ReferencedFile nodeDirRef,
                                             NodeSettingsWO settings,
                                             ExecutionMonitor exec,
                                             boolean saveData)
                                      throws IOException,
                                             CanceledExecutionException
Throws:
IOException
CanceledExecutionException

savePort

protected static void savePort(Node node,
                               File portDir,
                               NodeSettingsWO settings,
                               ExecutionMonitor exec,
                               int portIdx,
                               boolean saveData)
                        throws IOException,
                               CanceledExecutionException
Throws:
IOException
CanceledExecutionException

saveHasContent

protected static void saveHasContent(Node node,
                                     NodeSettingsWO settings)

saveIsInactive

protected static void saveIsInactive(Node node,
                                     NodeSettingsWO settings)

saveWarningMessage

protected static void saveWarningMessage(Node node,
                                         NodeSettingsWO settings)

saveNodeInternDirectory

protected static void saveNodeInternDirectory(Node node,
                                              File nodeInternDir,
                                              NodeSettingsWO settings,
                                              ExecutionMonitor exec)
                                       throws CanceledExecutionException
Sub-class hook to save location of internal directory.

Parameters:
node - Node
nodeInternDir - Directory
settings - Ignored (possibly not in sub-classes)
exec - exec mon.
Throws:
CanceledExecutionException - If canceled.

saveCustomName

protected static void saveCustomName(Node node,
                                     NodeSettingsWO settings)

loadIsExecuted

protected boolean loadIsExecuted(NodeSettingsRO settings)
                          throws InvalidSettingsException

Overrides:
loadIsExecuted in class NodePersistorVersion1xx
Throws:
InvalidSettingsException

loadWarningMessage

protected String loadWarningMessage(NodeSettingsRO settings)
                             throws InvalidSettingsException
Sub class hook to read warning message.

Overrides:
loadWarningMessage in class NodePersistorVersion1xx
Parameters:
settings - Ignored
Returns:
null
Throws:
InvalidSettingsException - Not actually thrown

getModelSettingsFailPolicy

public NodePersistor.LoadNodeModelSettingsFailPolicy getModelSettingsFailPolicy()

Specified by:
getModelSettingsFailPolicy in interface NodePersistor
Overrides:
getModelSettingsFailPolicy in class NodePersistorVersion1xx

loadHasContent

protected boolean loadHasContent(NodeSettingsRO settings)
                          throws InvalidSettingsException

Overrides:
loadHasContent in class NodePersistorVersion1xx
Throws:
InvalidSettingsException

loadIsInactive

protected boolean loadIsInactive(NodeSettingsRO settings)
                          throws InvalidSettingsException

Overrides:
loadIsInactive in class NodePersistorVersion1xx
Throws:
InvalidSettingsException

loadIsConfigured

protected boolean loadIsConfigured(NodeSettingsRO settings)
                            throws InvalidSettingsException

Overrides:
loadIsConfigured in class NodePersistorVersion1xx
Throws:
InvalidSettingsException

loadInternalHeldTables

protected void loadInternalHeldTables(Node node,
                                      ExecutionMonitor execMon,
                                      NodeSettingsRO settings,
                                      Map<Integer,BufferedDataTable> loadTblRep,
                                      HashMap<Integer,ContainerTable> tblRep)
                               throws IOException,
                                      InvalidSettingsException,
                                      CanceledExecutionException
Sub class hook to read internal tables.

Overrides:
loadInternalHeldTables in class NodePersistorVersion1xx
Parameters:
node - Ignored.
execMon - Ignored.
settings - Ignored.
loadTblRep - Ignored.
tblRep - Ignored.
Throws:
IOException - Not actually thrown.
InvalidSettingsException - Not actually thrown.
CanceledExecutionException - Not actually thrown.

loadPorts

protected void loadPorts(Node node,
                         ExecutionMonitor exec,
                         NodeSettingsRO settings,
                         Map<Integer,BufferedDataTable> loadTblRep,
                         HashMap<Integer,ContainerTable> tblRep)
                  throws IOException,
                         InvalidSettingsException,
                         CanceledExecutionException

Overrides:
loadPorts in class NodePersistorVersion1xx
Throws:
IOException
InvalidSettingsException
CanceledExecutionException

loadPortIndex

protected int loadPortIndex(NodeSettingsRO singlePortSetting)
                     throws InvalidSettingsException
Throws:
InvalidSettingsException

loadPort

protected void loadPort(Node node,
                        ReferencedFile portDir,
                        NodeSettingsRO settings,
                        ExecutionMonitor exec,
                        int portIdx,
                        Map<Integer,BufferedDataTable> loadTblRep,
                        HashMap<Integer,ContainerTable> tblRep)
                 throws IOException,
                        InvalidSettingsException,
                        CanceledExecutionException
Throws:
IOException
InvalidSettingsException
CanceledExecutionException


Copyright, 2003 - 2012. 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.