public class TaskImp extends ToolImp implements Task
Task.ConnectionStatusDEFAULT_NODE_REQUIREMENT, DEPRECATED_GUI_XPOS, DEPRECATED_GUI_YPOS, ERROR_MESSAGE, ESSENTIAL, ESSENTIAL_IF_CONNECTED, EXECUTION_COUNT, EXECUTION_REQUEST_COUNT, EXECUTION_STATE, GUI_X, GUI_Y, NODE_PROPERTIES, NODE_REQUIREMENT, OPTIONAL, OUTPUT_TYPEANY_DATA_TYPE, CLONE_ALL_OUTPUT, CLONE_MULTIPLE_OUTPUT, COPY_OUTPUT, DEFAULT_IN_NODES, DEFAULT_INPUT_NODES, DEFAULT_MAX_NODES, DEFAULT_MIN_NODES, DEFAULT_OUT_NODES, DEFAULT_OUTPUT_NODES, DEFAULT_POP_UP_DESCRIPTION, DEFINITION_JAVA_CLASS, DEFINITION_METADATA, DEFINITION_TRIANA_XML, DEFINITION_UNKNOWN, GUI, GUI_BUILDER, HELP_FILE_PARAM, IMMEDIATE_UPDATE, INTERNAL, LATE_INITIALIZE, MAX_INPUT_NODES, MAX_OUTPUT_NODES, MIN_INPUT_NODES, MIN_OUTPUT_NODES, NO_UPDATE, OLD_GUI_BUILDER, ON_TASK_INSTANTIATION, ON_USER_ACCESS, OUTPUT_POLICY, PANEL_INSTANCE, PARAM_PANEL_CLASS, PARAM_PANEL_HIDE, PARAM_PANEL_INSTANTIATE, PARAM_PANEL_SHOW, PARAM_UPDATE_POLICY, POP_UP_DESCRIPTION, PROCESS_UPDATE, TOOL_VERSION, TRANSIENT, TRANSIENT_ACCESSIBLE, UNKNOWN_DATA_TYPE, UNKNOWN_TYPE, USER_ACCESSIBLE| Constructor and Description |
|---|
TaskImp(Tool tool,
TaskFactory factory,
boolean preserveinst) |
| Modifier and Type | Method and Description |
|---|---|
Node |
addDataInputNode()
Adds a data input node.
|
Node |
addDataOutputNode()
Adds a data output node.
|
void |
addDeclaredNodeProperty(java.lang.String prop) |
ParameterNode |
addParameterInputNode(java.lang.String paramname)
Adds a parameter input node for the specified parameter name.
|
ParameterNode |
addParameterOutputNode(java.lang.String paramname)
Adds a parameter output node for the specified paramter name.
|
void |
addTaskListener(TaskListener listener)
Adds a task listener to this task.
|
void |
dispose()
cleans up any operations associated with this task
|
int |
getAbsoluteNodeIndex(Node node)
This is a convience method to provide backward compatibility with TrianaGUI, in which parameter nodes where
indexed after data nodes.
|
TaskGraphContext |
getContext() |
java.lang.Object |
getContextProperty(java.lang.String name) |
Node |
getDataInputNode(int index) |
int |
getDataInputNodeCount() |
Node[] |
getDataInputNodes() |
Node |
getDataOutputNode(int index) |
int |
getDataOutputNodeCount() |
Node[] |
getDataOutputNodes() |
java.util.List<java.lang.String> |
getDeclaredNodeProperties() |
java.lang.String |
getDefaultNodeRequirement() |
java.lang.String |
getErrorMessage() |
int |
getExecutionCount() |
int |
getExecutionRequestCount() |
ExecutionState |
getExecutionState() |
Node |
getInputNode(int absoluteindex) |
Node[] |
getInputNodes() |
java.lang.String |
getInstanceID()
All copies of a task within a parameter space (sharing the same parameters) have the same intance id.
|
int |
getNodeIndex(Node node)
Returns the index of the specified node within the data input/output and parameter input/output nodes; or -1 if
not attached to this task.
|
java.lang.String |
getNodeRequirement(int index) |
Node |
getOutputNode(int absoluteindex) |
Node[] |
getOutputNodes() |
java.lang.String |
getParameterInputName(int index) |
ParameterNode |
getParameterInputNode(int index) |
int |
getParameterInputNodeCount() |
ParameterNode[] |
getParameterInputNodes() |
java.lang.String |
getParameterOutputName(int index) |
ParameterNode |
getParameterOutputNode(int index) |
int |
getParameterOutputNodeCount() |
ParameterNode[] |
getParameterOutputNodes() |
TaskGraph |
getParent() |
java.lang.String |
getQualifiedTaskName() |
TaskGraph |
getUltimateParent() |
void |
init()
Initialisation method is called immediately after the parent is set
|
boolean |
isDataInputNode(Node node) |
boolean |
isDataOutputNode(Node node) |
boolean |
isParameterInputNode(Node node) |
boolean |
isParameterOutputNode(Node node) |
boolean |
isParameterTriggerNode(int index) |
boolean |
isRunContinuously() |
protected void |
notifyNodeAdded(Node node)
Notifies all the task listeners that a node has been added.
|
protected void |
notifyNodeRemoved(Node node)
Notifies all the task listeners that a node has been removed.
|
protected void |
notifyParameterSet(java.lang.String name,
java.lang.String type,
java.lang.Object oldval,
java.lang.Object newval)
Notifies all the task listeners that a parameter has been set.
|
protected void |
notifyPropertyUpdate(int property,
java.lang.Object oldval,
java.lang.Object newval)
Notifies all the task listeners that a task property has been updated.
|
protected void |
notifyTaskDisposed()
Notifies all the task listeners that the task is about to be disposed
|
void |
removeDataInputNode(Node node)
Removes a data input node.
|
void |
removeDataOutputNode(Node node)
Removes a data output node.
|
void |
removeNode(Node node)
Removes the specified node
|
void |
removeParameter(java.lang.String name)
Removes the value associated with the specified parameter name.
|
void |
removeParameterInputNode(ParameterNode node)
Removes a parameter input node.
|
void |
removeParameterOutputNode(ParameterNode node)
Removes a parameter output node.
|
void |
removeProxy()
Removes the proxy for this tool
|
void |
removeTaskListener(TaskListener listener)
Removes a task listener from this task.
|
void |
setContextProperty(java.lang.String name,
java.lang.Object value) |
void |
setDataInputNodeCount(int nodeCount)
Used by ToolFactory to set the number of input nodes.
|
void |
setDataOutputNodeCount(int nodeCount)
Used by ToolFactory to set the number of output nodes.
|
void |
setDeclaredNodeProperties(java.util.List<java.lang.String> props) |
void |
setDefaultNodeRequirement(java.lang.String requirement)
Sets the default input node requirement for this task (ESSENTIAL, ESSENTIAL_IF_CONNECTED or OPTIONAL)
|
void |
setNodeRequirement(int index,
java.lang.String requirement)
Sets the input node requirement for the specified node index (ESSENTIAL, ESSENTIAL_IF_CONNECTED or OPTIONAL)
|
void |
setParameter(java.lang.String name,
java.lang.Object value)
Sets the value for the specified parameter name.
|
void |
setParameterInputs(java.lang.String[] names,
boolean[] trigger)
Used to set the names/number of input parameter nodes
|
void |
setParameterOutputNames(java.lang.String[] names)
Used to set the names/number of output parameter nodes
|
void |
setParent(TaskGraph taskgraph)
Sets the taskgraph that this task is located within
|
void |
setProxy(Proxy proxy)
Adds a proxy this tool
|
void |
setRunContinuously(boolean state)
Sets whether this task runs continuously.
|
void |
setSubTitle(java.lang.String subtext) |
void |
setToolName(java.lang.String toolname)
Sets the name associated with this Task.
|
void |
updateProxy()
Refreshes the proxy
|
addExtension, addRenderingHint, getDataInputTypes, getDataInputTypes, getDataOutputTypes, getDataOutputTypes, getDefaultDataInputNodes, getDefaultDataOutputNodes, getDefinitionPath, getDefinitionType, getDisplayName, getDisplayPackage, getExtension, getExtensionNames, getHelpFile, getInputNodeCount, getMaxDataInputNodes, getMaxDataOutputNodes, getMinDataInputNodes, getMinDataOutputNodes, getOutputNodeCount, getParameter, getParameterNames, getParameterType, getPopUpDescription, getProperties, getProxy, getQualifiedToolName, getRenderingHint, getRenderingHints, getSubTitle, getToolBox, getToolName, getToolPackage, getUnitName, getUnitPackage, getVersion, isExtensionName, isParameterName, isRenderingHint, removeExtension, removeRenderingHint, setDataInputTypes, setDataInputTypes, setDataOutputTypes, setDataOutputTypes, setDefaultDataInputNodes, setDefaultDataOutputNodes, setDefinitionPath, setDefinitionType, setDisplayName, setDisplayPackage, setHelpFile, setMaxDataInputNodes, setMaxDataOutputNodes, setMinDataInputNodes, setMinDataOutputNodes, setParameterOutputs, setParameterType, setPopUpDescription, setProperties, setToolBox, setToolPackage, setVersion, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExtension, addRenderingHint, getDataInputTypes, getDataInputTypes, getDataOutputTypes, getDataOutputTypes, getDefaultDataInputNodes, getDefaultDataOutputNodes, getDefinitionPath, getDefinitionType, getDisplayName, getDisplayPackage, getExtension, getExtensionNames, getHelpFile, getInputNodeCount, getMaxDataInputNodes, getMaxDataOutputNodes, getMinDataInputNodes, getMinDataOutputNodes, getOutputNodeCount, getParameter, getParameterNames, getParameterType, getPopUpDescription, getProperties, getProxy, getQualifiedToolName, getRenderingHint, getRenderingHints, getSubTitle, getToolBox, getToolName, getToolPackage, getVersion, isExtensionName, isParameterName, isRenderingHint, removeExtension, removeRenderingHint, setDataInputTypes, setDataOutputTypes, setDefinitionPath, setDefinitionType, setHelpFile, setParameterOutputs, setParameterType, setPopUpDescription, setProperties, setToolBox, setToolPackage, setVersionpublic TaskImp(Tool tool, TaskFactory factory, boolean preserveinst) throws TaskException
TaskExceptionpublic void init()
throws TaskException
init in interface TaskTaskExceptionpublic void setToolName(java.lang.String toolname)
setToolName in interface ToolsetToolName in class ToolImppublic java.lang.String getQualifiedTaskName()
getQualifiedTaskName in interface Taskpublic TaskGraph getParent()
public TaskGraph getUltimateParent()
getUltimateParent in interface Taskpublic void setParent(TaskGraph taskgraph)
public java.lang.String getInstanceID()
getInstanceID in interface Taskpublic void setProxy(Proxy proxy) throws TaskException
setProxy in interface ToolsetProxy in class ToolImpTaskExceptionpublic void updateProxy()
updateProxy in interface Taskpublic void removeProxy()
throws TaskException
removeProxy in interface ToolremoveProxy in class ToolImpTaskExceptionpublic void addTaskListener(TaskListener listener)
addTaskListener in interface Taskpublic void removeTaskListener(TaskListener listener)
removeTaskListener in interface Taskpublic void setParameter(java.lang.String name,
java.lang.Object value)
setParameter in interface ToolsetParameter in class ToolImppublic void removeParameter(java.lang.String name)
removeParameter in interface ToolremoveParameter in class ToolImppublic Node addDataInputNode() throws NodeException
addDataInputNode in interface TaskNodeExceptionpublic void removeDataInputNode(Node node)
removeDataInputNode in interface Taskpublic Node getDataInputNode(int index)
getDataInputNode in interface Taskpublic Node[] getDataInputNodes()
getDataInputNodes in interface Taskpublic int getDataInputNodeCount()
getDataInputNodeCount in interface ToolgetDataInputNodeCount in class ToolImppublic void setDataInputNodeCount(int nodeCount)
throws NodeException
setDataInputNodeCount in class ToolImpNodeExceptionpublic Node addDataOutputNode() throws NodeException
addDataOutputNode in interface TaskNodeExceptionpublic void removeDataOutputNode(Node node)
removeDataOutputNode in interface Taskpublic Node getDataOutputNode(int index)
getDataOutputNode in interface Taskpublic Node[] getDataOutputNodes()
getDataOutputNodes in interface Taskpublic int getDataOutputNodeCount()
getDataOutputNodeCount in interface ToolgetDataOutputNodeCount in class ToolImppublic void setDataOutputNodeCount(int nodeCount)
throws NodeException
setDataOutputNodeCount in class ToolImpNodeExceptionpublic ParameterNode addParameterInputNode(java.lang.String paramname) throws NodeException
addParameterInputNode in interface TaskNodeExceptionpublic void removeParameterInputNode(ParameterNode node)
removeParameterInputNode in interface Taskpublic void setParameterInputs(java.lang.String[] names,
boolean[] trigger)
throws NodeException
setParameterInputs in interface ToolsetParameterInputs in class ToolImpNodeExceptionpublic ParameterNode getParameterInputNode(int index)
getParameterInputNode in interface Taskpublic java.lang.String getParameterInputName(int index)
getParameterInputName in interface ToolgetParameterInputName in class ToolImppublic boolean isParameterTriggerNode(int index)
isParameterTriggerNode in interface ToolisParameterTriggerNode in class ToolImppublic ParameterNode[] getParameterInputNodes()
getParameterInputNodes in interface Taskpublic int getParameterInputNodeCount()
getParameterInputNodeCount in interface ToolgetParameterInputNodeCount in class ToolImppublic ParameterNode addParameterOutputNode(java.lang.String paramname) throws NodeException
addParameterOutputNode in interface TaskNodeExceptionpublic void removeParameterOutputNode(ParameterNode node)
removeParameterOutputNode in interface Taskpublic void setParameterOutputNames(java.lang.String[] names)
throws NodeException
NodeExceptionpublic java.lang.String getParameterOutputName(int index)
getParameterOutputName in interface ToolgetParameterOutputName in class ToolImppublic ParameterNode getParameterOutputNode(int index)
getParameterOutputNode in interface Taskpublic ParameterNode[] getParameterOutputNodes()
getParameterOutputNodes in interface Taskpublic int getParameterOutputNodeCount()
getParameterOutputNodeCount in interface ToolgetParameterOutputNodeCount in class ToolImppublic int getNodeIndex(Node node)
getNodeIndex in interface Taskpublic int getAbsoluteNodeIndex(Node node)
getAbsoluteNodeIndex in interface Taskpublic boolean isDataInputNode(Node node)
isDataInputNode in interface Taskpublic boolean isDataOutputNode(Node node)
isDataOutputNode in interface Taskpublic boolean isParameterInputNode(Node node)
isParameterInputNode in interface Taskpublic boolean isParameterOutputNode(Node node)
isParameterOutputNode in interface Taskpublic Node[] getInputNodes()
getInputNodes in interface Taskpublic Node getInputNode(int absoluteindex)
getInputNode in interface Taskpublic Node[] getOutputNodes()
getOutputNodes in interface Taskpublic Node getOutputNode(int absoluteindex)
getOutputNode in interface Taskpublic void removeNode(Node node)
removeNode in interface Taskpublic boolean isRunContinuously()
isRunContinuously in interface Taskpublic void setRunContinuously(boolean state)
setRunContinuously in interface Taskpublic void setDefaultNodeRequirement(java.lang.String requirement)
setDefaultNodeRequirement in interface Taskpublic java.lang.String getDefaultNodeRequirement()
getDefaultNodeRequirement in interface Taskpublic void setNodeRequirement(int index,
java.lang.String requirement)
setNodeRequirement in interface Taskpublic java.lang.String getNodeRequirement(int index)
getNodeRequirement in interface Taskpublic int getExecutionRequestCount()
getExecutionRequestCount in interface Taskpublic int getExecutionCount()
getExecutionCount in interface Taskpublic ExecutionState getExecutionState()
getExecutionState in interface Taskpublic java.lang.String getErrorMessage()
getErrorMessage in interface Taskprotected void notifyPropertyUpdate(int property,
java.lang.Object oldval,
java.lang.Object newval)
protected void notifyNodeAdded(Node node)
protected void notifyNodeRemoved(Node node)
protected void notifyParameterSet(java.lang.String name,
java.lang.String type,
java.lang.Object oldval,
java.lang.Object newval)
protected void notifyTaskDisposed()
public void dispose()
public TaskGraphContext getContext()
getContext in interface Taskpublic java.lang.Object getContextProperty(java.lang.String name)
getContextProperty in interface Taskpublic void setContextProperty(java.lang.String name,
java.lang.Object value)
setContextProperty in interface Taskpublic void setDeclaredNodeProperties(java.util.List<java.lang.String> props)
setDeclaredNodeProperties in interface Taskpublic void addDeclaredNodeProperty(java.lang.String prop)
addDeclaredNodeProperty in interface Taskpublic java.util.List<java.lang.String> getDeclaredNodeProperties()
getDeclaredNodeProperties in interface Taskpublic void setSubTitle(java.lang.String subtext)
setSubTitle in interface ToolsetSubTitle in class ToolImp