GraphStream Users

Archives de la liste Aide

Re: GEXF for Dynamic Graphs?

Chronologique Discussions 
  • From: Dylan Hutchison <dhutchis AT>
  • To: guilhelm savin <guilhelm.savin AT>
  • Cc: graphstream-users AT, Dylan Hutchison <dhutchis AT>
  • Subject: Re: GEXF for Dynamic Graphs?
  • Date: Wed, 31 Jul 2013 18:53:42 -0700

  Thanks a million for merging that change in.  It does the job on the most part.  The main difficulty is in formatting the spell and attribute time stamps-- the specification is described here.  There are three alternatives: 'date', 'dateTime', and 'Double'.  Which to use may depend on the user's application needs, so it may be good to make that configurable via a setTimeFormat( ) method on a FileSinkGEXF object.
Here is the output as the current code generates:
<spell start="1.189907999E9"></spell>
The exponential notation doesn't conform to the GEXF format, and it seems to mess up Gephi on load.

To try and fix it, I replaced the Double.toString(... calls in FileSinkGEXF with DATEF.format(... using
private static final DateFormat DATEF = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ");
to meet the 'DateTime' format specification.  See the attached diff file for details.

This doesn't quite seem to do the trick because Gephi still signals parse errors on loading the GEXF file, so perhaps there's something else we're missing... not sure.

I'm new to open-source development efforts; could you point me to the places to file bug reports and suggest changes, perhaps the dev mailing list?  

Dylan Hutchison

On Wed, Jul 31, 2013 at 8:34 AM, guilhelm savin <guilhelm.savin AT> wrote:
Hi Dylan,

I have commited an update of FileSinkGEXF that should handle the dynamics ... You can get it on github.
You can use it like this :

Graph g = new SingleGraph("data");
FileSinkGEXF fsinkgexf = new FileSinkGEXF();



It should be really buggy so ... please report bugs you will find :)
Hope this will help ...


2013/7/31 Dylan Hutchison <dhutchis AT>
Hi there,

Back in January an email went around on using the Timeline class plus FileSinkGEXF to record a stream of graph events to a Timeline object, and at a later time, write out all those events to a GEXF file via FileSinkGEXF.  Since then, Timeline has seen good development and has really nice playback methods. But, there still does not appear to be any way to save a Timeline (or Graph in general) to a GEXF file.  

Does anyone have any suggestions on how to save a dynamic graph to a GEXF file?

Ideally, I would like to write something like this:
Timeline timeline = new Timeline();
Graph g = new SingleGraph("data");

//timeline.playback(); // Side note: Really useful method for playing back to a Graph g

// Can we play back to a file instead?
FileSinkGEXF fsinkgexf = new FileSinkGEXF();
fsinkgexf.playbackTo(fsinkgexf, "output.gexf"); // made up method

Dylan Hutchison

Guilhelm Savin
PhD Student of Computer Science

Description: Binary data

  • Re: GEXF for Dynamic Graphs?, Dylan Hutchison, 01/08/2013

Archives gérées par MHonArc 2.6.16.

Top of page