de.cau.cs.kieler.kiml.export.exporter
Class GMLExporter

java.lang.Object
  extended by de.cau.cs.kieler.kiml.export.AbstractExporter
      extended by de.cau.cs.kieler.kiml.export.exporter.GMLExporter
All Implemented Interfaces:
IExporter

public class GMLExporter
extends AbstractExporter

A graph exporter for the GML file format.

Rating red

Field Summary
 
Fields inherited from class de.cau.cs.kieler.kiml.export.AbstractExporter
ERROR_MESSAGE_EXPORT_FAILED
 
Constructor Summary
GMLExporter()
          Constructs the GML exporter.
 
Method Summary
 void doExport(KNode graph, OutputStream stream, MapPropertyHolder options, IKielerProgressMonitor monitor)
          Performs the actual graph export by using the given options and writing the result to the stream.
 String getDefaultExtension()
          Returns the default file extension for this exporter.
 String[] getExtensions()
          Returns the exporters supported file extensions.
 String getName()
          Returns the name of the file format the exporter is exporting to.
static void serializeKGraphAsGML(KNode graph, OutputStream outputStream, boolean layoutInformation, IKielerProgressMonitor monitor)
          Serializes the given KGraph using GML.
 
Methods inherited from class de.cau.cs.kieler.kiml.export.AbstractExporter
addOption, getOptions, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GMLExporter

public GMLExporter()
Constructs the GML exporter.

Method Detail

getName

public String getName()
Returns the name of the file format the exporter is exporting to.

Specified by:
getName in class AbstractExporter
Returns:
the name of the file format

getDefaultExtension

public String getDefaultExtension()
Returns the default file extension for this exporter.

Specified by:
getDefaultExtension in class AbstractExporter
Returns:
the default file extension

getExtensions

public String[] getExtensions()
Returns the exporters supported file extensions.

Specified by:
getExtensions in class AbstractExporter
Returns:
the supported file extensions

doExport

public void doExport(KNode graph,
                     OutputStream stream,
                     MapPropertyHolder options,
                     IKielerProgressMonitor monitor)
Performs the actual graph export by using the given options and writing the result to the stream.

Parameters:
graph - the graph
stream - the output stream
options - the export options
monitor - the progress monitor

serializeKGraphAsGML

public static void serializeKGraphAsGML(KNode graph,
                                        OutputStream outputStream,
                                        boolean layoutInformation,
                                        IKielerProgressMonitor monitor)
                                 throws IOException
Serializes the given KGraph using GML.

Parameters:
monitor - the progress monitor
graph - the graph
outputStream - the output stream
layoutInformation - true if the serialized graph should contain layout information
Throws:
IOException - thrown when an io operation failed