Gexf4j, a new Java library to create GEXF files


Francesco Ficarola is a Computer Engineer and a Ph.D. student at the Sapienza University of Rome. In addition he is been working for an Italian company as R&D Engineer for one year. His main research interests are Wireless Sensor Networks, Social Networking and whatever concerns “Internet of Things”.

Gephi supports the 1.2draft of GEXF file format since version 0.8. Until now, if you are a Java developer, you couldn’t use any up-to-date Java library to manage this version of the format. The only available library for building GEXF graphs was gexf4j-core v.0.2.0-ALPHA by J. Campanini. Unfortunately that library implemented GEXF 1.1draft only, and is no longer maintained. So I have decided to update that library in order to work and build GEXF 1.2draft compliant graphs. This version introduced many improvements, see the changelog.

The latest version of gexf4j (currently 0.3.1) supports new XML attributes and data types to encode dynamic networks:

  • timeformat or spell
  • open intervals (startopen/endopen)
  • double
  • date
  • xsd:dateTime

In addition, the javadoc has been added and all methods have now meaningful names for their parameters.

Creating a GEXF file with gexf4j is very simple and requires very few lines of code: read the two examples in the project README file, or find them in the “it.uniroma1.dis.wiserver.gexf4j.examples” project package.

<!–If you have been a gexfj-core v.0.2.0-ALPHA user, you will be able to easily program with the new version. You only need to change the code a little for the dynamic features, in particular:

  • “TimeType” class has been renamed “TimeFormat”.
  • “Slice” components are renamed “Spell”, according to 1.2draft.
  • The methods “setStartDate(Date d)” and “setEndDate(d)” are changed in “setStartValue(Object o)” and “setEndValue(Object o)”, respectly, in order to support multiple timeformat type: double (default), date and xsd:dateTime.
  • The Methods “Date getStartDate()” and “Date getEndDate()” are changed in “Object getStartValue()” and “Object getEndValue()”, respectly.
  • The methods “setStartIntervalType(IntervalType startIntervalType)” and “setEndIntervalType(IntervalType endIntervalType)” have been added in order to allow the user to choose the interval type (open or close) of the “start/end” attribute.

Finally, if you would like to support this project, please let me know, you are welcome… and if you want to stay informed about the latest news on gexf4j, just follow me on Twitter: @f_ficarola

Checkout code

git clone git://

Report issues

Simply go to the Issues tab.

Have a nice “GEXF graph”!

Francesco Ficarola


  1. Howdy. I’m the original author of gexf4j. Sorry for dropping work on it – things got busy for me… Shoot me an email and we can work out transitioning anything over to you… Even if there’s nothing, love to just chat 🙂



  2. Hi Javier! How are things? It will be a pleasure working or chatting with you.
    My “gmail username” is francesco.ficarola (I don’t write the whole email address for the obfuscation against spam bots).

    Have a nice day,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s