org.esa.beam.framework.gpf.graph
Class GraphIO

java.lang.Object
  extended by org.esa.beam.framework.gpf.graph.GraphIO

public class GraphIO
extends Object

The GraphIO class contains methods for the serialization/deserialization of XML-based Graph definitions.

Author:
Maximilian Aulinger, Norman Fomferra, Ralf Quast

Method Summary
static Graph read(Reader reader)
          Deserializes a graph from an XML Reader.
static Graph read(Reader reader, Map<String,String> variables)
          Deserializes a Graph from a XML Reader using a mapping for the substitution of template variables inside the XML-based Graph definition.
static void write(Graph graph, Writer writer)
          Serializes the given graph into XML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

write

public static void write(Graph graph,
                         Writer writer)
Serializes the given graph into XML

Parameters:
graph - the graph to write into XML
writer - the writer to use for serialization.

read

public static Graph read(Reader reader)
                  throws GraphException
Deserializes a graph 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 a Graph from a XML Reader using a mapping for the substitution of template variables inside the XML-based Graph definition.

Parameters:
reader - the XML reader
variables - a mapping from template variable names to their string values.
Returns:
the deserialized graph
Throws:
GraphException - if an error occurs during reading


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.