Package org.esa.snap.core.gpf.graph
Class Node
- java.lang.Object
-
- org.esa.snap.core.gpf.graph.Node
-
public class Node extends Object
A node in a processing graph. ANode
has an arbitrary nummber of sources and produces one target product. A set of nodes may be joined together via the sources to form a directed acyclic graph (DAG). TheNode
uses anOperator
implementation to transform the target Products of the source Nodes to a target Product. TheNode
will create itsOperator
by using the given OperatorSpi.- Since:
- 4.1
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSource(NodeSource source)
DomElement
getConfiguration()
String
getId()
Gets the uniqe node identifier.String
getOperatorName()
Gets the name of the operator.NodeSource
getSource(int index)
Returns theNodeSource
at the given index positionNodeSource[]
getSources()
void
removeSource(NodeSource source)
Removes aNodeSource
from theNode
.void
setConfiguration(DomElement configuration)
Sets the configuration for the node'sOperator
that computes the target Product.
-
-
-
Method Detail
-
getId
public String getId()
Gets the uniqe node identifier.- Returns:
- the identifier
-
getOperatorName
public String getOperatorName()
Gets the name of the operator. This can be either the fully qualified class name of theOperatorSpi
or an alias name.- Returns:
- the name of the operator.
-
addSource
public void addSource(NodeSource source)
- Parameters:
source
- theNodeSource
to be added.
-
removeSource
public void removeSource(NodeSource source)
Removes aNodeSource
from theNode
.- Parameters:
source
- theNodeSource
to be removed
-
getSource
public NodeSource getSource(int index) throws IndexOutOfBoundsException
Returns theNodeSource
at the given index position- Parameters:
index
- the index of theNodeSource
to return- Returns:
- the
NodeSource
at the given index position - Throws:
IndexOutOfBoundsException
- if index is out of range
-
getSources
public NodeSource[] getSources()
- Returns:
- an array containing the Sources of this node.
-
getConfiguration
public DomElement getConfiguration()
- Returns:
- A
DomElement
storing the configuration elements of the node's Operator.
-
setConfiguration
public void setConfiguration(DomElement configuration)
Sets the configuration for the node'sOperator
that computes the target Product.- Parameters:
configuration
- The configuration
-
-