experimental Pajek .net exporter plugin

Asked by Daniel Bernardes

Hello,

I've coded an experimental Exporter plugin for Pajek's .NET format: it is a simple version, aimed to be compatible with Gephi's current Importer plugin for Pajek files.

I've just post it in a new branch; if I could have some feedback from the Gephi team it would be great :)

cheers!

dB

Question information

Language:
English Edit question
Status:
Solved
For:
Gephi Edit question
Assignee:
No assignee Edit question
Solved by:
Mathieu Bastian
Solved:
Last query:
Last reply:
Revision history for this message
Best Mathieu Bastian (mathieu.bastian) said :
#1

Hi Daniel, nice job

- It seems a graph.readLock() is missing at the beginning of the exportData method. The lock is released at the end 'readUnlockAll' already.

- The Node.getId() is an ID unique only for a particular view. In the case it's a visible view which is exported, the source and target node returned by getSource() and getTarget() will not be the source and target of the particular view. Therefore I recommend to use the node.getNodeData().getId() identifier instead, which is unique for all views.

- In order to support hierarchical graphs, I advise to get a HierarchicalGraph instead of a Graph and replace getEdges() by getEdgesAndMetaEdges()

Revision history for this message
Daniel Bernardes (daniel-bernardes) said :
#2

Thanks Mathieu Bastian, that solved my question.

Revision history for this message
Daniel Bernardes (daniel-bernardes) said :
#3

Thanks for the comments! :)

I had decided to use Node.getId() instead of node.getNodeData().getId() thinking the first was an absolutely unique id and the second wasn't; in the light of your comment I've replaced the id source. I've also changed Graph to HierarchicalGraph and the corresponding methods before uploading the corrected version of the plugin.

cheers,
dB