Package org.gephi.io.importer.spi
Interfaces for creating new data importers.
Create a new Importer
- Create a new module and set
Import API
,File System API
andUtilities API
as dependencies. -
Create a new builder class, which implements:
- FileImporterBuilder (files)
- DatabaseImporterBuilder (databases)
- WizardImportBuilder (web and more complex scenarios)
-
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,WizardImportBuilder.class
for wizards andDatabaseImporter.class
for databases. -
Create a new importer class,which implements
FileImporter
,DatabaseImport
orWizardImporter
. -
In the builder, return a new instance of your importer in the
buildImporter()
method. -
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.
-
Interface Summary Interface Description DatabaseImporter Importers interface for importing data from database sources.DatabaseImporterBuilder Importer builder specific forDatabaseImporter
.FileImporter Importers interface for importing data from files.FileImporter.FileAware Optional interface to implement forFileImporter
classes that need to receive the source file instead of theReader
FileImporterBuilder Importer builder specific forFileImporter
.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.ImporterUI.WithWizard Optional interface to implement forImporterUI
classes that need a WizardImporterWizardUI Define importer settings wizard user interface.WizardImporter Importers interface for importing data from wizards.WizardImporterBuilder Importer builder specific forWizardImporter
.