← Back to team overview

gephi.team team mailing list archive

Re: [Question #147581]: writing a DB connector plugin

 

Question #147581 on Gephi changed:
https://answers.launchpad.net/gephi/+question/147581

    Status: Open => Answered

Mathieu Bastian proposed the following answer:
1. Create a new 'Library Wrapper' module with your JDBC JAR. In
Netbeans, right click on the Gephi project, and module,  and 'Add new
Library'. Follow the steps to create a module. The module is embedding
your JDBC JARs.

2. Add DBDrivers as a dependency of this module, as well as Lookup

3. Add a new class that implements SQLDriver interface.

4. Add this annotation to your class. That will register your driver, and make it available in the list on the 'Import Database' panel.
@ServiceProvider(service=SQLDriver.class)
public class MyDriver implements SQLDriver...

5. Now, your Driver is registered and can be used with the current
'Import Database' panel in Gephi. If you want to create your own
importer, follow the steps on the importer HowTo
(http://wiki.gephi.org/index.php/HowTo_write_an_import) but using
Database instead of File.

-- 
You received this question notification because you are a member of
Gephi Team, which is an answer contact for Gephi.