Class VisioExporter<V,E>

java.lang.Object
org.jgrapht.nio.BaseExporter<V,E>
org.jgrapht.nio.csv.VisioExporter<V,E>
Type Parameters:
V - the graph vertex type
E - the graph edge type
All Implemented Interfaces:
GraphExporter<V,E>

public class VisioExporter<V,E> extends BaseExporter<V,E> implements GraphExporter<V,E>
Exports a graph to a CSV format that can be imported into MS Visio.

Tip: By default, the exported graph doesn't show link directions. To show link directions:

  1. Select All (Ctrl-A)
  2. Right Click the selected items
  3. Format/Line...
  4. Line ends: End: (choose an arrow)
Author:
Avner Linder
  • Constructor Details

    • VisioExporter

      public VisioExporter()
      Creates a new VisioExporter.
    • VisioExporter

      public VisioExporter(Function<V,String> vertexIdProvider)
      Creates a new exporter.
      Parameters:
      vertexIdProvider - the vertex id provider to be used for naming the Visio shapes
  • Method Details

    • exportGraph

      public void exportGraph(Graph<V,E> g, Writer writer)
      Exports the specified graph into a Visio CSV file format.
      Specified by:
      exportGraph in interface GraphExporter<V,E>
      Parameters:
      g - the graph to be exported.
      writer - the writer to which the graph to be exported.