Class LemonExporter<V,E>

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

public class LemonExporter<V,E> extends BaseExporter<V,E> implements GraphExporter<V,E>
Exports a graph into Lemon graph format (LGF).

This is the custom graph format used in the Lemon graph library.

Author:
Dimitrios Michail
  • Constructor Details

    • LemonExporter

      public LemonExporter()
      Constructs a new exporter.
    • LemonExporter

      public LemonExporter(Function<V,String> vertexIdProvider)
      Constructs a new exporter with a given vertex id provider.
      Parameters:
      vertexIdProvider - for generating vertex IDs. Must not be null.
  • Method Details

    • exportGraph

      public void exportGraph(Graph<V,E> g, Writer writer)
      Description copied from interface: GraphExporter
      Export a graph using the given Writer.

      It is the callers responsibility to ensure the Writer is closed after this method returned.

      Specified by:
      exportGraph in interface GraphExporter<V,E>
      Parameters:
      g - the graph to export
      writer - the output writer
    • isParameter

      public boolean isParameter(LemonExporter.Parameter p)
      Return if a particular parameter of the exporter is enabled
      Parameters:
      p - the parameter
      Returns:
      true if the parameter is set, false otherwise
    • setParameter

      public void setParameter(LemonExporter.Parameter p, boolean value)
      Set the value of a parameter of the exporter
      Parameters:
      p - the parameter
      value - the value to set