Gephi Toolkit: save project as .gephi

Asked by Christian Peikert

Hello everyone,
I’m using the gephi toolkit and implement in java. Right now I have created a gephi project and did some fancy graphical stuff. Exporting the results in a pdf or gexf seems to work as well. But I want to save the whole project, not just the graph.
To do so I am doing this:
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();

File file = new File("newProject.gephi");
pc.saveProject(pc.getCurrentProject(), file).run();

but I experience the following error:

Aug 30, 2012 10:59:19 AM org.openide.util.NbPreferences getPreferencesProvider
Warnung: NetBeans implementation of Preferences not found

Someone have an idea to solve this problem?

p.s.: My IDE is Eclipse but in NetBeans the problem looks the same!

Question information

Language:
English Edit question
Status:
Solved
For:
Gephi Edit question
Assignee:
No assignee Edit question
Solved by:
Eduardo Ramos
Solved:
Last query:
Last reply:
Revision history for this message
Sébastien Heymann (sebastien.heymann) said :
#1

Hi,

We don't use Launchpad anymore. Please post your issue on
https://github.com/gephi/gephi/issues

Thank you

2012/8/30 Christian Peikert <email address hidden>

> New question #207259 on Gephi:
> https://answers.launchpad.net/gephi/+question/207259
>
> Hello everyone,
> I’m using the gephi toolkit and implement in java. Right now I have
> created a gephi project and did some fancy graphical stuff. Exporting the
> results in a pdf or gexf seems to work as well. But I want to save the
> whole project, not just the graph.
> To do so I am doing this:
> ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
> pc.newProject();
> …
> File file = new File("newProject.gephi");
> pc.saveProject(pc.getCurrentProject(), file).run();
>
> but I experience the following error:
>
> Aug 30, 2012 10:59:19 AM org.openide.util.NbPreferences
> getPreferencesProvider
> Warnung: NetBeans implementation of Preferences not found
>
> Someone have an idea to solve this problem?
>
> p.s.: My IDE is Eclipse but in NetBeans the problem looks the same!
>
>
> --
> You received this question notification because you are a member of
> Gephi Team, which is an answer contact for Gephi.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~gephi.team
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~gephi.team
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
Best Eduardo Ramos (eduramiba) said :
#2

Hi,
This is just a warning you don't need to worry about, and your .gephi file will be fine. Preferences are usually set up in Gephi UI and can't be loaded in the toolkit.
But when this happens (very few usages in the classes included in the toolkit), default values are used. In this case, the preference is the zip compression level, which is never changed in Gephi anyway.

Eduardo

Revision history for this message
Christian Peikert (christian-peikert) said :
#3

Thanks Eduardo for you fast answer!
But the problem that I still have is that no file is created. It’s not in the folder where the other exported files were been generated and neither in the directory that I used for the file object initialization.

Revision history for this message
Christian Peikert (christian-peikert) said :
#4

Just a brief update: Eduardo was right to ignore the warning! Everything is working now!

Revision history for this message
Christian Peikert (christian-peikert) said :
#5

Thanks Eduardo Ramos, that solved my question.