Gephi Toolkit Javadoc

Package org.gephi.io.importer.spi

Interfaces for creating new data importers.

See:
          Description

Interface Summary
DatabaseImporter Importers interface for importing data from database sources.
DatabaseImporterBuilder Importer builder specific for DatabaseImporter.
FileImporter Importers interface for importing data from files.
FileImporterBuilder Importer builder specific for FileImporter.
Importer Interface for classes which imports data from files, databases, streams or other sources.
ImporterBuilder Factory class for building importer instances.
ImporterUI Define importer settings user interface.
ImporterWizardUI Define importer settings wizard user interface.
SpigotImporter Importers interface for importing data from spigots.
SpigotImporterBuilder Importer builder specific for SpigotImporter.
 

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:
  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.


Gephi Toolkit Javadoc