Package org.gephi.io.exporter.spi
Interfaces for creating new data exporters.
Create a new Exporter
-
Create a new module and set
Export API
,Project API
andUtilities API
as dependencies. -
Create a new builder class, which implements:
- GraphFileExporterBuilder (graph)
- VectorFileExporterBuilder (vector graphics)
- ExportBuilder (custom)
-
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 andExportBuilder.class
for the rest. -
Create a new exporter class, which implements
GraphExporter
,VectorExporter
or simplyExporter
. -
Implement also
ByteExporter
interface for byte streams orCharacterExporter
for texts. -
In the builder, return a new instance of your exporter in the
buildExporter()
method. -
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.
-
Interface Summary Interface Description ByteExporter Exporter class for byte streams, when anOutputStream
is needed.CharacterExporter Exporter class for char streams, when anWriter
is needed.Exporter Define a class that can export data.ExporterBuilder Factory class for building exporter instances.ExporterUI Define exporter settings user interface.FileExporterBuilder Exporter builder for a particular file format support.GraphExporter Exporter interface for exporters that export the graph, either complete or filtered (i.e.GraphFileExporterBuilder Exporter builder for graph file format support.VectorExporter Exporter interface for exporters that export vector graphics.VectorFileExporterBuilder Exporter builder for vector file format support.