org.jgrapht.ext

## Class GraphMLExporter<V,E>

- java.lang.Object
- - org.jgrapht.ext.GraphMLExporter<V,E>

-     public class GraphMLExporter<V,E>
      extends Object

  Exports a graph into a GraphML file.

  For a description of the format see http://en.wikipedia.org/wiki/GraphML.

  Author:
    Trevor Harmon

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `GraphMLExporter()` Constructs a new GraphMLExporter object with integer name providers for the vertex and edge IDs and null providers for the vertex and edge labels.
    `GraphMLExporter(VertexNameProvider<V> vertexIDProvider, VertexNameProvider<V> vertexLabelProvider, EdgeNameProvider<E> edgeIDProvider, EdgeNameProvider<E> edgeLabelProvider)` Constructs a new GraphMLExporter object with the given ID and label providers.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `export(Writer writer, Graph<V,E> g)` Exports a graph into a plain text file in GraphML format.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GraphMLExporter

          public GraphMLExporter()

      Constructs a new GraphMLExporter object with integer name providers for the vertex and edge IDs and null providers for the vertex and edge labels.

    - #### GraphMLExporter

          public GraphMLExporter(VertexNameProvider<V> vertexIDProvider,
                         VertexNameProvider<V> vertexLabelProvider,
                         EdgeNameProvider<E> edgeIDProvider,
                         EdgeNameProvider<E> edgeLabelProvider)

      Constructs a new GraphMLExporter object with the given ID and label providers.
      Parameters:
        `vertexIDProvider` - for generating vertex IDs. Must not be null.
        `vertexLabelProvider` - for generating vertex labels. If null, vertex labels will not be written to the file.
        `edgeIDProvider` - for generating vertex IDs. Must not be null.
        `edgeLabelProvider` - for generating edge labels. If null, edge labels will not be written to the file.

  - ### Method Detail

    - #### export

          public void export(Writer writer,
                    Graph<V,E> g)
                      throws SAXException,
                             TransformerConfigurationException

      Exports a graph into a plain text file in GraphML format.
      Parameters:
        `writer` - the writer to which the graph to be exported
        `g` - the graph to be exported
      Throws:
        `SAXException`
        `TransformerConfigurationException`

Copyright © 2016. All rights reserved.