Package org.esa.snap.core.gpf.graph
Class GraphContext
- java.lang.Object
-
- org.esa.snap.core.gpf.graph.GraphContext
-
public class GraphContext extends Object
- Since:
- 4.1
- See Also:
Graph
,GraphProcessor
-
-
Constructor Summary
Constructors Constructor Description GraphContext(Graph graph)
Creates a GraphContext for the givengraph
and alogger
.GraphContext(Graph graph, Operator graphOp)
Creates a GraphContext for the givengraph
and alogger
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes thisGraphContext
.Graph
getGraph()
Gets theGraph
of this context.Deque<NodeContext>
getInitNodeContextDeque()
Gets theNodeContext
s in the reverse order as they were initialized.Logger
getLogger()
Gets the @link Logger} of this context.NodeContext
getNodeContext(Node node)
Gets theNodeContext
of the given node.Product[]
getOutputProducts()
Returns an array containing the output products generated by this graph's output nodes, i.e.void
setPreferredTileSize(Dimension preferredTileSize)
Sets the preferred tile size.
-
-
-
Constructor Detail
-
GraphContext
public GraphContext(Graph graph) throws GraphException
Creates a GraphContext for the givengraph
and alogger
.- Parameters:
graph
- theGraph
to create the context for- Throws:
GraphException
- if the graph context could not be created
-
GraphContext
public GraphContext(Graph graph, Operator graphOp) throws GraphException
Creates a GraphContext for the givengraph
and alogger
.- Parameters:
graph
- theGraph
to create the context for- Throws:
GraphException
- if the graph context could not be created
-
-
Method Detail
-
dispose
public void dispose()
Disposes thisGraphContext
.
-
getLogger
public Logger getLogger()
Gets the @link Logger} of this context.- Returns:
- the logger
-
setPreferredTileSize
public void setPreferredTileSize(Dimension preferredTileSize)
Sets the preferred tile size.- Parameters:
preferredTileSize
- the preferred tile size
-
getOutputProducts
public Product[] getOutputProducts()
Returns an array containing the output products generated by this graph's output nodes, i.e. nodes that are not input to other nodes.- Returns:
- an array containing the output products of this graph
-
getInitNodeContextDeque
public Deque<NodeContext> getInitNodeContextDeque()
Gets theNodeContext
s in the reverse order as they were initialized.- Returns:
- a deque of
NodeContext
s
-
getNodeContext
public NodeContext getNodeContext(Node node)
Gets theNodeContext
of the given node.- Parameters:
node
- the node to get the context for- Returns:
- the
NodeContext
of the givennode
ornull
if it's not contained in this context
-
-