org.knime.core.node
Class CopyNodePersistor

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

public class CopyNodePersistor
extends Object
implements NodePersistor

A persistor cloning a node's settings. It does not retain port objects or node internals. Used by copy&paste and undo.

Author:
Bernd Wiswedel, University of Konstanz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.knime.core.node.NodePersistor
NodePersistor.LoadNodeModelSettingsFailPolicy
 
Field Summary
 
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
CopyNodePersistor(Node original)
          Create a new persistor.
 
Method Summary
 BufferedDataTable[] getInternalHeldTables()
          
 NodePersistor.LoadNodeModelSettingsFailPolicy getModelSettingsFailPolicy()
          
 ReferencedFile getNodeInternDirectory()
          
 PortObject getPortObject(int outportIndex)
          
 PortObjectSpec getPortObjectSpec(int outportIndex)
          
 String getPortObjectSummary(int outportIndex)
          
 NodeSettingsRO getSettings()
          
 String getWarningMessage()
          
 boolean hasContent()
          
 boolean isConfigured()
          
 boolean isDirtyAfterLoad()
          Whether this node should be marked as dirty after load.
 boolean isExecuted()
          
 void loadInto(Node node)
          Apply the settings to the new node.
 boolean mustWarnOnDataLoadError()
          
 boolean needsResetAfterLoad()
          
 void setDirtyAfterLoad()
          Sets the dirty flag on this node.
 void setNeedsResetAfterLoad()
          Indicate an error and that this node should better be reset after load.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyNodePersistor

CopyNodePersistor(Node original)
Create a new persistor.

Parameters:
original - The node to copy.
Method Detail

loadInto

public void loadInto(Node node)
Apply the settings to the new node.

Parameters:
node - the node just created.

getModelSettingsFailPolicy

public NodePersistor.LoadNodeModelSettingsFailPolicy getModelSettingsFailPolicy()

Specified by:
getModelSettingsFailPolicy in interface NodePersistor

getSettings

public NodeSettingsRO getSettings()

Specified by:
getSettings in interface NodePersistor

isConfigured

public boolean isConfigured()

Specified by:
isConfigured in interface NodePersistor

isDirtyAfterLoad

public boolean isDirtyAfterLoad()
Whether this node should be marked as dirty after load. This is true if either the NodePersistor.setDirtyAfterLoad() has been set to true or NodeContentPersistor.needsResetAfterLoad() returns true.

Specified by:
isDirtyAfterLoad in interface NodePersistor
Returns:
This property.

isExecuted

public boolean isExecuted()

Specified by:
isExecuted in interface NodePersistor

setDirtyAfterLoad

public void setDirtyAfterLoad()
Sets the dirty flag on this node. The node will also be dirty if the NodeContentPersistor.setNeedsResetAfterLoad() is called.

Specified by:
setDirtyAfterLoad in interface NodePersistor

getInternalHeldTables

public BufferedDataTable[] getInternalHeldTables()

Specified by:
getInternalHeldTables in interface NodeContentPersistor

getNodeInternDirectory

public ReferencedFile getNodeInternDirectory()

Specified by:
getNodeInternDirectory in interface NodeContentPersistor

getPortObject

public PortObject getPortObject(int outportIndex)

Specified by:
getPortObject in interface NodeContentPersistor

getPortObjectSpec

public PortObjectSpec getPortObjectSpec(int outportIndex)

Specified by:
getPortObjectSpec in interface NodeContentPersistor

getPortObjectSummary

public String getPortObjectSummary(int outportIndex)

Specified by:
getPortObjectSummary in interface NodeContentPersistor

getWarningMessage

public String getWarningMessage()

Specified by:
getWarningMessage in interface NodeContentPersistor

hasContent

public boolean hasContent()

Specified by:
hasContent in interface NodeContentPersistor

mustWarnOnDataLoadError

public boolean mustWarnOnDataLoadError()

Specified by:
mustWarnOnDataLoadError in interface NodeContentPersistor

needsResetAfterLoad

public boolean needsResetAfterLoad()

Specified by:
needsResetAfterLoad in interface NodeContentPersistor

setNeedsResetAfterLoad

public void setNeedsResetAfterLoad()
Indicate an error and that this node should better be reset after load.

Specified by:
setNeedsResetAfterLoad in interface NodeContentPersistor


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.