[export gexf] Null attributes are not exported

Get help with your data
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Teplele
Posts:2
Joined:18 Dec 2014 09:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[export gexf] Null attributes are not exported

Post by Teplele » 18 Dec 2014 09:47

Hi,

I have encountered some issues when I exported my graph in the format gexf.
My previous structure, which I imported, of data is an gexf graph. I use gephi toolkit to spatialize the graph and add nodes color . Some of attributes values' are void. As in this exemple :

Code: Select all

<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 on my graph, i export it in a format gexf. And when I look at the structure of my new file, I noticed that the attributes which have void values are not in. As in the exemple, this is the gexf exported :

Code: Select all

<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" />
There are attribute 4/5 and 7 which are missing.

Is it in some export options that I can solved my trouble or is it an implicit action of the gephi exporter ?

Thank you !

Teplele
Posts:2
Joined:18 Dec 2014 09:28
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: [export gexf] Null attributes are not exported

Post by Teplele » 18 Dec 2014 11:51

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...

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable