org.knime.core.node.workflow
Class WorkflowPersistorVersion1xx

java.lang.Object
  extended by org.knime.core.node.workflow.WorkflowPersistorVersion1xx
All Implemented Interfaces:
NodeContainerPersistor, WorkflowPersistor
Direct Known Subclasses:
ObsoleteMetaNodeWorkflowPersistorVersion1xx, WorkflowPersistorVersion200

 class WorkflowPersistorVersion1xx
extends Object
implements WorkflowPersistor

Author:
wiswedel, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.workflow.WorkflowPersistor
WorkflowPersistor.ConnectionContainerTemplate, WorkflowPersistor.LoadResult, WorkflowPersistor.LoadResultEntry, WorkflowPersistor.WorkflowLoadResult, WorkflowPersistor.WorkflowPortTemplate
 
Field Summary
 
Fields inherited from interface org.knime.core.node.workflow.WorkflowPersistor
KEY_CONNECTIONS, KEY_ID, KEY_NODES, KEY_UI_INFORMATION, SAVED_WITH_DATA_FILE, WORKFLOW_FILE
 
Constructor Summary
WorkflowPersistorVersion1xx(HashMap<Integer,ContainerTable> tableRep, String versionString)
           
 
Method Summary
(package private) static boolean canReadVersion(String versionString)
           
protected  NodeContainerMetaPersistorVersion1xx createNodeContainerMetaPersistor(ReferencedFile baseDir)
           
protected  SingleNodeContainerPersistorVersion1xx createSingleNodeContainerPersistor()
           
protected  WorkflowPersistorVersion1xx createWorkflowPersistor()
           
protected  String fixUIInfoClassName(String name)
           
 Set<WorkflowPersistor.ConnectionContainerTemplate> getConnectionSet()
          
 HashMap<Integer,ContainerTable> getGlobalTableRepository()
          
 UIInformation getInPortsBarUIInfo()
          Get UI information for workflow input ports.
 WorkflowPersistor.WorkflowPortTemplate[] getInPortTemplates()
          
 String getLoadVersion()
          
protected  NodeLogger getLogger()
           
 NodeContainerMetaPersistor getMetaPersistor()
          
 String getName()
          
 NodeContainer getNodeContainer(WorkflowManager parent, NodeID id)
          
 Map<Integer,NodeContainerPersistor> getNodeLoaderMap()
          
 UIInformation getOutPortsBarUIInfo()
          Get UI information for workflow output ports.
 WorkflowPersistor.WorkflowPortTemplate[] getOutPortTemplates()
          
protected  String getVersionString()
           
protected  ReferencedFile getWorkflowDir()
           
 List<FlowVariable> getWorkflowVariables()
          Get the workflow variables associated with this meta node/workflow.
 boolean isDirtyAfterLoad()
          
protected  WorkflowPersistor.ConnectionContainerTemplate loadConnection(NodeSettingsRO settings)
           
protected  int loadConnectionDestID(NodeSettingsRO settings)
           
protected  int loadConnectionDestPort(NodeSettingsRO settings)
           
protected  boolean loadIfMustWarnOnDataLoadError(File workflowFile)
           
protected  void loadInPortsBarUIInfo(UIInformation uiInfo, NodeSettingsRO settings)
           
protected  String loadInPortsBarUIInfoClassName(NodeSettingsRO settings)
           
protected  NodeSettingsRO loadInPortsSetting(NodeSettingsRO settings)
           
protected  NodeSettingsRO loadInPortsSettingsEnum(NodeSettingsRO settings)
           
protected  WorkflowPersistor.WorkflowPortTemplate loadInPortTemplate(NodeSettingsRO settings)
           
protected  boolean loadIsMetaNode(NodeSettingsRO settings)
           
 void loadNodeContainer(Map<Integer,BufferedDataTable> tblRep, ExecutionMonitor exec, WorkflowPersistor.LoadResult loadResult)
          
protected  ReferencedFile loadNodeFile(NodeSettingsRO settings, ReferencedFile workflowDirRef)
           
protected  int loadNodeIDSuffix(NodeSettingsRO settings)
           
protected  void loadOutPortsBarUIInfo(UIInformation uiInfo, NodeSettingsRO settings)
           
protected  String loadOutPortsBarUIInfoClassName(NodeSettingsRO settings)
           
protected  NodeSettingsRO loadOutPortsSetting(NodeSettingsRO settings)
           
protected  NodeSettingsRO loadOutPortsSettingsEnum(NodeSettingsRO settings)
           
protected  WorkflowPersistor.WorkflowPortTemplate loadOutPortTemplate(NodeSettingsRO settings)
           
protected  NodeSettingsRO loadSettingsForConnections(NodeSettingsRO set)
           
protected  NodeSettingsRO loadSettingsForNodes(NodeSettingsRO set)
           
protected  String loadUIInfoClassName(NodeSettingsRO settings)
           
protected  UIInformation loadUIInfoInstance(String className)
          Creates the UIInformaion from given settings, describing whatever additional information was stored (graphical layout?).
protected  void loadUIInfoSettings(UIInformation uiInfo, NodeSettingsRO settings)
           
protected  String loadVersion(NodeSettingsRO settings)
           
protected  String loadWorkflowName(NodeSettingsRO set)
           
protected  List<FlowVariable> loadWorkflowVariables(NodeSettingsRO settings)
          Load workflow variables (not available in 1.3.x flows).
 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 nodeFileRef, NodeSettingsRO parentSettings, WorkflowPersistor.LoadResult loadResult)
          
protected  NodeSettingsRO readParentSettings()
           
protected  void setDirtyAfterLoad()
          Mark node as dirty.
 void setNeedsResetAfterLoad()
          Indicate that this node should better be reset after load.
protected  boolean shouldSkipThisNode(NodeSettingsRO settings)
          This is overridden by the meta node loader (1.x.x) and returns true for the "special" nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowPersistorVersion1xx

WorkflowPersistorVersion1xx(HashMap<Integer,ContainerTable> tableRep,
                            String versionString)
Method Detail

canReadVersion

static boolean canReadVersion(String versionString)

getVersionString

protected final String getVersionString()

getLogger

protected NodeLogger getLogger()

getLoadVersion

public String getLoadVersion()

Specified by:
getLoadVersion in interface WorkflowPersistor

getWorkflowDir

protected ReferencedFile getWorkflowDir()
Returns:
the workflowDir

getConnectionSet

public Set<WorkflowPersistor.ConnectionContainerTemplate> getConnectionSet()

Specified by:
getConnectionSet in interface WorkflowPersistor

getNodeLoaderMap

public Map<Integer,NodeContainerPersistor> getNodeLoaderMap()

Specified by:
getNodeLoaderMap in interface WorkflowPersistor

mustWarnOnDataLoadError

public boolean mustWarnOnDataLoadError()

Specified by:
mustWarnOnDataLoadError in interface WorkflowPersistor
Returns:
the shouldFailOnLoadDataError

getMetaPersistor

public NodeContainerMetaPersistor getMetaPersistor()

Specified by:
getMetaPersistor in interface NodeContainerPersistor

getGlobalTableRepository

public HashMap<Integer,ContainerTable> getGlobalTableRepository()

Specified by:
getGlobalTableRepository in interface WorkflowPersistor

getNodeContainer

public NodeContainer getNodeContainer(WorkflowManager parent,
                                      NodeID id)

Specified by:
getNodeContainer in interface NodeContainerPersistor

getName

public String getName()

Specified by:
getName in interface WorkflowPersistor

getWorkflowVariables

public List<FlowVariable> getWorkflowVariables()
Get the workflow variables associated with this meta node/workflow. This method must not return null (but possibly an empty list). The result may be unmodifiable.

Specified by:
getWorkflowVariables in interface WorkflowPersistor
Returns:
The workflow variables.

getInPortTemplates

public WorkflowPersistor.WorkflowPortTemplate[] getInPortTemplates()

Specified by:
getInPortTemplates in interface WorkflowPersistor

getOutPortTemplates

public WorkflowPersistor.WorkflowPortTemplate[] getOutPortTemplates()

Specified by:
getOutPortTemplates in interface WorkflowPersistor

getInPortsBarUIInfo

public UIInformation getInPortsBarUIInfo()
Get UI information for workflow input ports.

Specified by:
getInPortsBarUIInfo in interface WorkflowPersistor
Returns:
the ui info or null if not set.

getOutPortsBarUIInfo

public UIInformation getOutPortsBarUIInfo()
Get UI information for workflow output ports.

Specified by:
getOutPortsBarUIInfo in interface WorkflowPersistor
Returns:
the ui info or null if not set.

needsResetAfterLoad

public boolean needsResetAfterLoad()

Specified by:
needsResetAfterLoad in interface NodeContainerPersistor

setNeedsResetAfterLoad

public void setNeedsResetAfterLoad()
Indicate that this node should better be reset after load. (Due to loading 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 node as dirty.


preLoadNodeContainer

public void preLoadNodeContainer(ReferencedFile nodeFileRef,
                                 NodeSettingsRO parentSettings,
                                 WorkflowPersistor.LoadResult loadResult)
                          throws InvalidSettingsException,
                                 IOException

Specified by:
preLoadNodeContainer in interface NodeContainerPersistor
Throws:
InvalidSettingsException
IOException

loadNodeContainer

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

Specified by:
loadNodeContainer in interface NodeContainerPersistor
Throws:
CanceledExecutionException
IOException

readParentSettings

protected NodeSettingsRO readParentSettings()
                                     throws IOException
Throws:
IOException

shouldSkipThisNode

protected boolean shouldSkipThisNode(NodeSettingsRO settings)
This is overridden by the meta node loader (1.x.x) and returns true for the "special" nodes.

Parameters:
settings - node sub-element
Returns:
true if to skip (though in 99.9% false)

loadVersion

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

loadNodeIDSuffix

protected int loadNodeIDSuffix(NodeSettingsRO settings)
                        throws InvalidSettingsException
Throws:
InvalidSettingsException

loadUIInfoClassName

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

fixUIInfoClassName

protected String fixUIInfoClassName(String name)

loadUIInfoInstance

protected UIInformation loadUIInfoInstance(String className)
Creates the UIInformaion from given settings, describing whatever additional information was stored (graphical layout?).

Parameters:
className - The name of the class to be loaded.
Returns:
new UIInformation object or null

loadUIInfoSettings

protected void loadUIInfoSettings(UIInformation uiInfo,
                                  NodeSettingsRO settings)
                           throws InvalidSettingsException
Throws:
InvalidSettingsException

loadInPortsBarUIInfoClassName

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

loadInPortsBarUIInfo

protected void loadInPortsBarUIInfo(UIInformation uiInfo,
                                    NodeSettingsRO settings)
                             throws InvalidSettingsException
Throws:
InvalidSettingsException

loadOutPortsBarUIInfoClassName

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

loadOutPortsBarUIInfo

protected void loadOutPortsBarUIInfo(UIInformation uiInfo,
                                     NodeSettingsRO settings)
                              throws InvalidSettingsException
Throws:
InvalidSettingsException

loadNodeFile

protected ReferencedFile loadNodeFile(NodeSettingsRO settings,
                                      ReferencedFile workflowDirRef)
                               throws InvalidSettingsException
Throws:
InvalidSettingsException

loadIsMetaNode

protected boolean loadIsMetaNode(NodeSettingsRO settings)
                          throws InvalidSettingsException
Throws:
InvalidSettingsException

loadSettingsForConnections

protected NodeSettingsRO loadSettingsForConnections(NodeSettingsRO set)
                                             throws InvalidSettingsException
Throws:
InvalidSettingsException

loadConnection

protected WorkflowPersistor.ConnectionContainerTemplate loadConnection(NodeSettingsRO settings)
                                                                throws InvalidSettingsException
Throws:
InvalidSettingsException

loadConnectionDestID

protected int loadConnectionDestID(NodeSettingsRO settings)
                            throws InvalidSettingsException
Throws:
InvalidSettingsException

loadConnectionDestPort

protected int loadConnectionDestPort(NodeSettingsRO settings)
                              throws InvalidSettingsException
Throws:
InvalidSettingsException

loadSettingsForNodes

protected NodeSettingsRO loadSettingsForNodes(NodeSettingsRO set)
                                       throws InvalidSettingsException
Throws:
InvalidSettingsException

loadWorkflowName

protected String loadWorkflowName(NodeSettingsRO set)
                           throws InvalidSettingsException
Throws:
InvalidSettingsException

loadWorkflowVariables

protected List<FlowVariable> loadWorkflowVariables(NodeSettingsRO settings)
                                            throws InvalidSettingsException
Load workflow variables (not available in 1.3.x flows).

Parameters:
settings - To load from.
Returns:
The variables in a list.
Throws:
InvalidSettingsException - If any settings-related error occurs.

loadInPortsSetting

protected NodeSettingsRO loadInPortsSetting(NodeSettingsRO settings)
                                     throws InvalidSettingsException
Throws:
InvalidSettingsException

loadInPortsSettingsEnum

protected NodeSettingsRO loadInPortsSettingsEnum(NodeSettingsRO settings)
                                          throws InvalidSettingsException
Throws:
InvalidSettingsException

loadInPortTemplate

protected WorkflowPersistor.WorkflowPortTemplate loadInPortTemplate(NodeSettingsRO settings)
                                                             throws InvalidSettingsException
Throws:
InvalidSettingsException

loadOutPortsSetting

protected NodeSettingsRO loadOutPortsSetting(NodeSettingsRO settings)
                                      throws InvalidSettingsException
Throws:
InvalidSettingsException

loadOutPortsSettingsEnum

protected NodeSettingsRO loadOutPortsSettingsEnum(NodeSettingsRO settings)
                                           throws InvalidSettingsException
Throws:
InvalidSettingsException

loadOutPortTemplate

protected WorkflowPersistor.WorkflowPortTemplate loadOutPortTemplate(NodeSettingsRO settings)
                                                              throws InvalidSettingsException
Throws:
InvalidSettingsException

loadIfMustWarnOnDataLoadError

protected boolean loadIfMustWarnOnDataLoadError(File workflowFile)

createNodeContainerMetaPersistor

protected NodeContainerMetaPersistorVersion1xx createNodeContainerMetaPersistor(ReferencedFile baseDir)

createSingleNodeContainerPersistor

protected SingleNodeContainerPersistorVersion1xx createSingleNodeContainerPersistor()

createWorkflowPersistor

protected WorkflowPersistorVersion1xx createWorkflowPersistor()


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.