Skip navigation links

Package org.gephi.io.importer.spi

Interfaces for creating new data importers.

See: Description

Package org.gephi.io.importer.spi Description

Interfaces for creating new data importers.

Create a new Importer

  1. Create a new module and set Import API, File System API and Utilities API as dependencies.
  2. Create a new builder class, which implements:
    • FileImporterBuilder (files)
    • DatabaseImporterBuilder (databases)
    • SpigotImportBuilder (web and more complex scenarios)
  3. Add @ServiceProvider annotation to your class to declare you are implementing an Importer service. Put FileImporterBuilder.class as the annotation service parameter for text and XML, SpigotImportBuilder.class for spigots and DatabaseImporter.class for databases.
  4. Create a new importer class,which implements FileImporter, DatabaseImport or SpigotImporter.
  5. In the builder, return a new instance of your importer in the buildImporter() method.
  6. For settings UI, create a new ImporterUI implementation and add the @ServiceProvider annotation to it.

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

See HowTo write an import for more details.

Skip navigation links

Copyright © 2007–2015 Gephi Consortium. All rights reserved.