org.knime.core.node.workflow
Class SingleNodeContainerPersistorVersion1xx

java.lang.Object
  extended by org.knime.core.node.workflow.SingleNodeContainerPersistorVersion1xx
All Implemented Interfaces:
NodeContainerPersistor, SingleNodeContainerPersistor
Direct Known Subclasses:
SingleNodeContainerPersistorVersion200

public class SingleNodeContainerPersistorVersion1xx
extends Object
implements SingleNodeContainerPersistor

Author:
wiswedel, University of Konstanz

Field Summary
 
Fields inherited from interface org.knime.core.node.workflow.SingleNodeContainerPersistor
KEY_FACTORY_NAME, SETTINGS_FILE_NAME
 
Constructor Summary
SingleNodeContainerPersistorVersion1xx(WorkflowPersistorVersion1xx workflowPersistor, String versionString)
           
 
Method Summary
protected  NodeContainerMetaPersistorVersion1xx createNodeContainerMetaPersistor(ReferencedFile baseDir)
           
protected  NodePersistorVersion1xx createNodePersistor()
           
 List<FlowObject> getFlowObjects()
          
protected  NodeLogger getLogger()
           
 NodeContainerMetaPersistor getMetaPersistor()
           
 NodePersistor.LoadNodeModelSettingsFailPolicy getModelSettingsFailPolicy()
           
 Node getNode()
          
 SingleNodeContainer getNodeContainer(WorkflowManager wm, NodeID id)
          
 SingleNodeContainer.SingleNodeContainerSettings getSNCSettings()
          
protected  String getVersionString()
           
(package private)  WorkflowPersistorVersion1xx getWorkflowManagerPersistor()
           
 boolean isDirtyAfterLoad()
          
protected  List<FlowObject> loadFlowObjects(NodeSettingsRO settings)
           
 void loadNodeContainer(Map<Integer,BufferedDataTable> tblRep, ExecutionMonitor exec, WorkflowPersistor.LoadResult result)
          
protected  NodeFactory<NodeModel> loadNodeFactory(String factoryClassName)
           
protected  String loadNodeFactoryClassName(NodeSettingsRO parentSettings, NodeSettingsRO settings)
           
protected  String loadNodeFile(NodeSettingsRO settings)
           
protected  SingleNodeContainer.SingleNodeContainerSettings loadSNCSettings(NodeSettingsRO settings, NodePersistorVersion1xx nodePersistor)
           
 boolean mustComplainIfStateDoesNotMatch()
          Does this persistor complain if its persisted state state does not match the state after loading (typically all non-executed nodes are configured after load).
 boolean mustWarnOnDataLoadError()
           
 boolean needsResetAfterLoad()
          
 void preLoadNodeContainer(ReferencedFile settingsFileRef, NodeSettingsRO parentSettings, WorkflowPersistor.LoadResult result)
          
protected  void setDirtyAfterLoad()
          Mark as dirty.
 void setNeedsResetAfterLoad()
          Indicate that node should be reset after load (due to load problems).
protected  boolean shouldFixModelPortOrder()
           
(package private) static NodePersistor.LoadNodeModelSettingsFailPolicy translateToFailPolicy(NodeContainer.State nodeState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleNodeContainerPersistorVersion1xx

SingleNodeContainerPersistorVersion1xx(WorkflowPersistorVersion1xx workflowPersistor,
                                       String versionString)
Method Detail

getVersionString

protected final String getVersionString()

getLogger

protected NodeLogger getLogger()

needsResetAfterLoad

public boolean needsResetAfterLoad()

Specified by:
needsResetAfterLoad in interface NodeContainerPersistor

setNeedsResetAfterLoad

public void setNeedsResetAfterLoad()
Indicate that node should be reset after load (due to load problems).


isDirtyAfterLoad

public boolean isDirtyAfterLoad()

Specified by:
isDirtyAfterLoad in interface NodeContainerPersistor

mustComplainIfStateDoesNotMatch

public boolean mustComplainIfStateDoesNotMatch()
Does this persistor complain if its persisted state state does not match the state after loading (typically all non-executed nodes are configured after load). This is true for all SingleNodeContainer and newer meta nodes, but it will be false for meta nodes, which are loaded from 1.x workflow.

Specified by:
mustComplainIfStateDoesNotMatch in interface NodeContainerPersistor
Returns:
Such a property.

setDirtyAfterLoad

protected void setDirtyAfterLoad()
Mark as dirty.


getMetaPersistor

public NodeContainerMetaPersistor getMetaPersistor()
Specified by:
getMetaPersistor in interface NodeContainerPersistor

getNode

public Node getNode()

Specified by:
getNode in interface SingleNodeContainerPersistor

getSNCSettings

public SingleNodeContainer.SingleNodeContainerSettings getSNCSettings()

Specified by:
getSNCSettings in interface SingleNodeContainerPersistor

getFlowObjects

public List<FlowObject> getFlowObjects()

Specified by:
getFlowObjects in interface SingleNodeContainerPersistor

getNodeContainer

public SingleNodeContainer getNodeContainer(WorkflowManager wm,
                                            NodeID id)

Specified by:
getNodeContainer in interface NodeContainerPersistor

createNodePersistor

protected NodePersistorVersion1xx createNodePersistor()

preLoadNodeContainer

public void preLoadNodeContainer(ReferencedFile settingsFileRef,
                                 NodeSettingsRO parentSettings,
                                 WorkflowPersistor.LoadResult result)
                          throws InvalidSettingsException,
                                 IOException

Specified by:
preLoadNodeContainer in interface NodeContainerPersistor
Throws:
InvalidSettingsException
IOException

loadNodeContainer

public void loadNodeContainer(Map<Integer,BufferedDataTable> tblRep,
                              ExecutionMonitor exec,
                              WorkflowPersistor.LoadResult result)
                       throws InvalidSettingsException,
                              CanceledExecutionException,
                              IOException

Specified by:
loadNodeContainer in interface NodeContainerPersistor
Throws:
InvalidSettingsException
CanceledExecutionException
IOException

createNodeContainerMetaPersistor

protected NodeContainerMetaPersistorVersion1xx createNodeContainerMetaPersistor(ReferencedFile baseDir)

loadNodeFactoryClassName

protected String loadNodeFactoryClassName(NodeSettingsRO parentSettings,
                                          NodeSettingsRO settings)
                                   throws InvalidSettingsException
Throws:
InvalidSettingsException

loadNodeFactory

protected NodeFactory<NodeModel> loadNodeFactory(String factoryClassName)
                                          throws InvalidSettingsException,
                                                 InstantiationException,
                                                 IllegalAccessException,
                                                 ClassNotFoundException
Throws:
InvalidSettingsException
InstantiationException
IllegalAccessException
ClassNotFoundException

loadNodeFile

protected String loadNodeFile(NodeSettingsRO settings)
                       throws InvalidSettingsException
Throws:
InvalidSettingsException

loadSNCSettings

protected SingleNodeContainer.SingleNodeContainerSettings loadSNCSettings(NodeSettingsRO settings,
                                                                          NodePersistorVersion1xx nodePersistor)
                                                                   throws InvalidSettingsException
Throws:
InvalidSettingsException

loadFlowObjects

protected List<FlowObject> loadFlowObjects(NodeSettingsRO settings)
                                    throws InvalidSettingsException
Throws:
InvalidSettingsException

shouldFixModelPortOrder

protected boolean shouldFixModelPortOrder()

getWorkflowManagerPersistor

WorkflowPersistorVersion1xx getWorkflowManagerPersistor()

mustWarnOnDataLoadError

public boolean mustWarnOnDataLoadError()

getModelSettingsFailPolicy

public NodePersistor.LoadNodeModelSettingsFailPolicy getModelSettingsFailPolicy()
Returns:
the settingsFailPolicy

translateToFailPolicy

static final NodePersistor.LoadNodeModelSettingsFailPolicy translateToFailPolicy(NodeContainer.State nodeState)


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.