|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.NodeModel
org.knime.base.node.util.exttool.ExtToolOutputNodeModel
public abstract class ExtToolOutputNodeModel
Implements a NodeModel
for nodes that launch external commands. It
provides methods to store the output of the external tool and to save and
load this output. It comes with two views (ExtToolStderrNodeView
and
ExtToolStdoutNodeView
) which will display the text then. It
maintains two output buffers for each stream (output and error output). One
for a successful execution (which will be cleared when the node is reset)
(methods getExternalOutput()
and getExternalErrorOutput()
),
and one buffer keeping the output of a failing execution (for debugging
purposes), (methods getFailedExternalOutput()
and
getFailedExternalErrorOutput()
). The output of a failing run will
be shown in gray by the views, and will be preserved until the node is
re-executed.
Constructor Summary | |
---|---|
ExtToolOutputNodeModel(PortType[] inPortTypes,
PortType[] outPortTypes)
Constructor for a node with data and model ports. |
Method Summary | |
---|---|
List<String> |
getExternalErrorOutput()
|
List<String> |
getExternalOutput()
|
List<String> |
getFailedExternalErrorOutput()
|
List<String> |
getFailedExternalOutput()
|
protected void |
loadInternals(File nodeInternDir,
ExecutionMonitor exec)
Load internals into the derived NodeModel . |
protected void |
reset()
Override this function in the derived model and reset your NodeModel . |
protected void |
saveInternals(File nodeInternDir,
ExecutionMonitor exec)
Save internals of the derived NodeModel . |
protected void |
setExternalErrorOutput(LinkedList<String> extErrout)
|
protected void |
setExternalOutput(LinkedList<String> extOutput)
|
protected void |
setFailedExternalErrorOutput(LinkedList<String> failedExtErrout)
|
protected void |
setFailedExternalOutput(LinkedList<String> failedExtOutput)
|
void |
update(Observable o,
Object arg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExtToolOutputNodeModel(PortType[] inPortTypes, PortType[] outPortTypes)
inPortTypes
- types of the input portsoutPortTypes
- types of the output portsMethod Detail |
---|
protected void reset()
NodeModel
. All components should unregister themselves
from any observables (at least from the hilite handler right now). All
internally stored data structures should be released. User settings
should not be deleted/reset though.
reset
in class NodeModel
protected void loadInternals(File nodeInternDir, ExecutionMonitor exec) throws IOException, CanceledExecutionException
NodeModel
. This method is
only called if the Node
was executed. Read all your
internal structures from the given file directory to create your internal
data structure which is necessary to provide all node functionalities
after the workflow is loaded, e.g. view content and/or hilite mapping.
loadInternals
in class NodeModel
nodeInternDir
- The directory to read from.exec
- Used to report progress and to cancel the load process.
IOException
- If an error occurs during reading from this dir.
CanceledExecutionException
- If the loading has been canceled.NodeModel.saveInternals(File,ExecutionMonitor)
protected void saveInternals(File nodeInternDir, ExecutionMonitor exec) throws IOException, CanceledExecutionException
NodeModel
. This method is
only called if the Node
is executed. Write all your
internal structures into the given file directory which are necessary to
recreate this model when the workflow is loaded, e.g. view content and/or
hilite mapping.
saveInternals
in class NodeModel
nodeInternDir
- The directory to write into.exec
- Used to report progress and to cancel the save process.
IOException
- If an error occurs during writing to this dir.
CanceledExecutionException
- If the saving has been canceled.NodeModel.loadInternals(File,ExecutionMonitor)
public final List<String> getExternalOutput()
public final List<String> getFailedExternalOutput()
public final List<String> getExternalErrorOutput()
public final List<String> getFailedExternalErrorOutput()
protected final void setExternalOutput(LinkedList<String> extOutput)
extOutput
- the extOutput buffer list to set.protected final void setFailedExternalOutput(LinkedList<String> failedExtOutput)
failedExtOutput
- the failedExtOutput buffer list to set.protected final void setExternalErrorOutput(LinkedList<String> extErrout)
extErrout
- the extErrout buffer list to set. Must not be null.protected final void setFailedExternalErrorOutput(LinkedList<String> failedExtErrout)
failedExtErrout
- the failedExtErrout buffer list to set.public void update(Observable o, Object arg)
update
in interface Observer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |