Class Node

java.lang.Object
org.esa.snap.core.gpf.graph.Node

public class Node extends Object
A node in a processing graph. A Node 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). The Node uses an Operator implementation to transform the target Products of the source Nodes to a target Product. The Node will create its Operator by using the given OperatorSpi.
Since:
4.1
  • Constructor Details

    • Node

      public Node(String id, String operatorName)
      Constructs a new Node instance.
      Parameters:
      id - a unique identifier for the node
      operatorName - the name of the operator
  • Method Details

    • attachGraphNodeUpdater

      public void attachGraphNodeUpdater(GraphNodeUpdater graphNodeUpdater)
    • updateGraphNode

      public void updateGraphNode(NodeContext nodeContext) throws GraphException
      Throws:
      GraphException
    • 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 the OperatorSpi or an alias name.
      Returns:
      the name of the operator.
    • addSource

      public void addSource(NodeSource source)
      Parameters:
      source - the NodeSource to be added.
    • removeSource

      public void removeSource(NodeSource source)
      Removes a NodeSource from the Node.
      Parameters:
      source - the NodeSource to be removed
    • getSource

      public NodeSource getSource(int index) throws IndexOutOfBoundsException
      Returns the NodeSource at the given index position
      Parameters:
      index - the index of the NodeSource 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's Operator that computes the target Product.
      Parameters:
      configuration - The configuration