Class 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)
    • Constructor Detail

      • VisioExporter

        public VisioExporter()
        Creates a new VisioExporter.
      • VisioExporter

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

      • exportGraph

        public void exportGraph​(Graph<V,​E> g,
                                java.io.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.
      • exportEdge

        private void exportEdge​(java.io.PrintWriter out,
                                E edge,
                                Graph<V,​E> g)
      • exportVertex

        private void exportVertex​(java.io.PrintWriter out,
                                  V vertex)