I have encountered some issues when I exported my graph in the format gexf. My previous structure, which I imported, is a gexf graph. I use Gephi toolkit to spatialize the graph and add node colors. Some attribute values are void. As in this example:
<node id="3" label="label_name">
<attvalues>
<attvalue for="1" value="attribute_value" />
<attvalue for="2" value="attribute_value" />
<attvalue for="3" value="1" />
<attvalue for="4" value="" />
<attvalue for="5" value="" />
<attvalue for="6" value="@IP" />
<attvalue for="7" value="" />
<attvalue for="8" value="80" />
After spatialization and other actions, I export back to gexf. I noticed attributes which have void values are not included. This is the gexf exported :
<node id="3" label="label_name">
<attvalues>
<attvalue for="1" value="attribute_value" />
<attvalue for="2" value="attribute_value" />
<attvalue for="3" value="1" />
<attvalue for="6" value="@IP" />
<attvalue for="8" value="80" />
Attributes 4, 5 and 7 are missing. How can I solve this (or is it an implicit action of the Gephi exporter)?
I found where does the issue come from. It's in the code of gephi-toolkit, in the class ExporterGEXF.java. Especially in the method writeAttValues(XMLStreamWriter xmlWriter, AttributeRow row, TimeInterval visibleInterval).
In this method, all nodes are iterated and for each node all attributes are iterated. Next, the current attribute is tested : if it is not null, we write the attribute in the xml file. If not, the attribute null is ignored.
I am not going re compil the gephi toolkit, so i will replace all null attributes by a space (string).
I hope it will help...