Package org.esa.snap.core.gpf.graph
Class GraphIO
- java.lang.Object
-
- org.esa.snap.core.gpf.graph.GraphIO
-
public class GraphIO extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Graph
read(Reader reader)
Deserializes agraph
from an XML Reader.static Graph
read(Reader reader, Map<String,String> variables)
static void
write(Graph graph, Writer writer)
Serializes the givengraph
into XML
-
-
-
Method Detail
-
write
public static void write(Graph graph, Writer writer)
Serializes the givengraph
into XML- Parameters:
graph
- thegraph
to write into XMLwriter
- the writer to use for serialization.
-
read
public static Graph read(Reader reader) throws GraphException
Deserializes agraph
from an XML Reader.- Parameters:
reader
- the readerto use for deserialization- Returns:
- the deserialized
graph
- Throws:
GraphException
- if an error occurs during reading
-
read
public static Graph read(Reader reader, Map<String,String> variables) throws GraphException
Deserializes aGraph
from a XML Reader using a mapping for the substitution of template variables inside the XML-basedGraph
definition.- Parameters:
reader
- the XML readervariables
- a mapping from template variable names to their string values.- Returns:
- the deserialized
graph
- Throws:
GraphException
- if an error occurs during reading
-
-