org.knime.core.node.workflow
Class NodeContainerMetaPersistorVersion200

java.lang.Object
  extended by org.knime.core.node.workflow.NodeContainerMetaPersistorVersion1xx
      extended by org.knime.core.node.workflow.NodeContainerMetaPersistorVersion200
All Implemented Interfaces:
NodeContainerMetaPersistor

 class NodeContainerMetaPersistorVersion200
extends NodeContainerMetaPersistorVersion1xx

Author:
wiswedel, University of Konstanz

Field Summary
 
Fields inherited from interface org.knime.core.node.workflow.NodeContainerMetaPersistor
KEY_CUSTOM_DESCRIPTION, KEY_CUSTOM_NAME
 
Constructor Summary
NodeContainerMetaPersistorVersion200(ReferencedFile settingsFile, WorkflowLoadHelper loadHelper, WorkflowPersistorVersion200.LoadVersion version)
          Create load persistor.
 
Method Summary
protected  String loadCustomDescription(NodeSettingsRO settings, NodeSettingsRO parentSettings)
          Read the custom description.
protected  boolean loadIsDeletable(NodeSettingsRO settings)
          Load whether this node is deletable.
protected  ReferencedFile loadJobManagerInternalsDirectory(ReferencedFile parentDir, NodeSettingsRO settings)
          Load the directory name that is used to persist internals of the associated job manager.
protected  NodeAnnotationData loadNodeAnnotationData(NodeSettingsRO settings, NodeSettingsRO parentSettings)
          Read the custom description.
protected  NodeExecutionJobManager loadNodeExecutionJobManager(NodeSettingsRO settings)
          Load the execution manager responsible for this node.
protected  NodeSettingsRO loadNodeExecutionJobSettings(NodeSettingsRO settings)
          Load the settings representing the pending execution of this node.
protected  NodeMessage loadNodeMessage(NodeSettingsRO settings)
          Load messages that were set on the node.
protected  NodeContainer.State loadState(NodeSettingsRO settings, NodeSettingsRO parentSettings)
          Load the state of the node.
static void save(NodeSettingsWO settings, NodeContainer nc, ReferencedFile targetDir)
           
protected static void saveCustomDescription(NodeSettingsWO settings, NodeContainer nc)
           
protected static void saveIsDeletable(NodeSettingsWO settings, NodeContainer nc)
           
protected static void saveJobManagerInternalsDirectory(NodeSettingsWO settings, NodeContainer nc, ReferencedFile targetDir)
           
protected static void saveNodeAnnotation(NodeSettingsWO settings, NodeContainer nc)
           
protected static void saveNodeExecutionJob(NodeSettingsWO settings, NodeContainer nc)
           
protected static void saveNodeExecutionJobManager(NodeSettingsWO settings, NodeContainer nc)
           
protected static void saveNodeMessage(NodeSettingsWO settings, NodeContainer nc)
           
protected static boolean saveState(NodeSettingsWO settings, NodeContainer nc)
           
 
Methods inherited from class org.knime.core.node.workflow.NodeContainerMetaPersistorVersion1xx
getCustomDescription, getExecutionJobManager, getExecutionJobSettings, getLoadHelper, getLoadVersion, getLogger, getNodeAnnotationData, getNodeContainerDirectory, getNodeIDSuffix, getNodeMessage, getNodeSettingsFile, getState, getUIInfo, isDeletable, isDirtyAfterLoad, load, setDirtyAfterLoad, setNodeIDSuffix, setUIInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeContainerMetaPersistorVersion200

NodeContainerMetaPersistorVersion200(ReferencedFile settingsFile,
                                     WorkflowLoadHelper loadHelper,
                                     WorkflowPersistorVersion200.LoadVersion version)
Create load persistor.

Parameters:
settingsFile - The node file (only important while load)
loadHelper - As required by super constructor.
version - The load version
Method Detail

loadNodeExecutionJobManager

protected NodeExecutionJobManager loadNodeExecutionJobManager(NodeSettingsRO settings)
                                                       throws InvalidSettingsException
Load the execution manager responsible for this node. This methods is overwritten in the persistor reading the 2.0+ workflows.

Overrides:
loadNodeExecutionJobManager in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - To load from.
Returns:
null (only this implementation).
Throws:
InvalidSettingsException - If that fails.

loadNodeExecutionJobSettings

protected NodeSettingsRO loadNodeExecutionJobSettings(NodeSettingsRO settings)
                                               throws InvalidSettingsException
Load the settings representing the pending execution of this node. Returns null if this node was not saved as being executing.

Overrides:
loadNodeExecutionJobSettings in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - To load from.
Returns:
The execution job.
Throws:
InvalidSettingsException - If that fails.

loadJobManagerInternalsDirectory

protected ReferencedFile loadJobManagerInternalsDirectory(ReferencedFile parentDir,
                                                          NodeSettingsRO settings)
                                                   throws InvalidSettingsException
Load the directory name that is used to persist internals of the associated job manager. The default (local) job manager typically does not save any internals, but others (e.g. the grid executor) save the logs of their remote jobs.

Overrides:
loadJobManagerInternalsDirectory in class NodeContainerMetaPersistorVersion1xx
Parameters:
parentDir - The parent directory (the node dir).
settings - To load from.
Returns:
The file location containing the internals or null.
Throws:
InvalidSettingsException - If errors occur.

loadState

protected NodeContainer.State loadState(NodeSettingsRO settings,
                                        NodeSettingsRO parentSettings)
                                 throws InvalidSettingsException
Load the state of the node.

Overrides:
loadState in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - The settings associated with the node (used in 2.0+)
parentSettings - The parent settings (workflow.knime, used in 1.3x)
Returns:
The state
Throws:
InvalidSettingsException - In case of errors reading the argument

loadIsDeletable

protected boolean loadIsDeletable(NodeSettingsRO settings)
Load whether this node is deletable.

Overrides:
loadIsDeletable in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - to load from
Returns:
true in this implementation, sub-classes overwrite this behavior

loadNodeAnnotationData

protected NodeAnnotationData loadNodeAnnotationData(NodeSettingsRO settings,
                                                    NodeSettingsRO parentSettings)
                                             throws InvalidSettingsException
Read the custom description.

Overrides:
loadNodeAnnotationData in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - The settings associated with the node (used in 2.0+)
parentSettings - The parent settings (workflow.knime, used in 1.3x)
Returns:
The custom name or null
Throws:
InvalidSettingsException - In case of errors reading the argument

loadCustomDescription

protected String loadCustomDescription(NodeSettingsRO settings,
                                       NodeSettingsRO parentSettings)
                                throws InvalidSettingsException
Read the custom description.

Overrides:
loadCustomDescription in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - The settings associated with the node (used in 2.0+)
parentSettings - The parent settings (workflow.knime, used in 1.3x)
Returns:
The custom name or null
Throws:
InvalidSettingsException - In case of errors reading the argument

loadNodeMessage

protected NodeMessage loadNodeMessage(NodeSettingsRO settings)
                               throws InvalidSettingsException
Load messages that were set on the node.

Overrides:
loadNodeMessage in class NodeContainerMetaPersistorVersion1xx
Parameters:
settings - to load from.
Returns:
null in this class, sub-classes overwrite this method.
Throws:
InvalidSettingsException - If this fails.

save

public static void save(NodeSettingsWO settings,
                        NodeContainer nc,
                        ReferencedFile targetDir)

saveNodeExecutionJobManager

protected static void saveNodeExecutionJobManager(NodeSettingsWO settings,
                                                  NodeContainer nc)

saveNodeExecutionJob

protected static void saveNodeExecutionJob(NodeSettingsWO settings,
                                           NodeContainer nc)

saveJobManagerInternalsDirectory

protected static void saveJobManagerInternalsDirectory(NodeSettingsWO settings,
                                                       NodeContainer nc,
                                                       ReferencedFile targetDir)

saveState

protected static boolean saveState(NodeSettingsWO settings,
                                   NodeContainer nc)

saveNodeAnnotation

protected static void saveNodeAnnotation(NodeSettingsWO settings,
                                         NodeContainer nc)

saveCustomDescription

protected static void saveCustomDescription(NodeSettingsWO settings,
                                            NodeContainer nc)

saveIsDeletable

protected static void saveIsDeletable(NodeSettingsWO settings,
                                      NodeContainer nc)

saveNodeMessage

protected static void saveNodeMessage(NodeSettingsWO settings,
                                      NodeContainer nc)


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.