Package org.gephi.io.exporter.spi

Interfaces for creating new data exporters.

Create a new Exporter

  1. Create a new module and set Export API, Project API and Utilities API as dependencies.
  2. Create a new builder class, which implements:
    • GraphFileExporterBuilder (graph)
    • VectorFileExporterBuilder (vector graphics)
    • ExportBuilder (custom)
  3. Add @ServiceProvider annotation to your class to declare you are implementing an Exporter service. Put GraphFileExporterBuilder.class as the annotation service parameter for graph files, VectorFileExporterBuilder.class for vector graphics and ExportBuilder.class for the rest.
  4. Create a new exporter class, which implements GraphExporter, VectorExporter or simply Exporter.
  5. Implement also ByteExporter interface for byte streams or CharacterExporter for texts.
  6. In the builder, return a new instance of your exporter in the buildExporter() method.
  7. For settings UI, create a new ExporterUI implementation and add the @ServiceProvider annotation to it.

To let your export task be cancelled and its progress watched, implement LongTask interface. Add LongTask API as dependency to your module first.