GraphML importer doesn't import node labels data
Bug #581629 reported by
Mathieu Bastian
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gephi |
Fix Released
|
Medium
|
Mathieu Bastian | ||
0.7 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
For the graphml string below, Gephi doesn't recognize the label
<node id="0">
<data key="label"
</node>
Changed in gephi: | |
status: | Confirmed → Fix Committed |
Changed in gephi: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi
I suggest following fix (see code snippet below) thus labels are recognized for GraphML files created by yEd (yworks.com).
Best Regards
Raymond
public class ImporterGraphML implements FileImporter, LongTask {
properties. addNodeProperty Association( NodeProperties. LABEL, "label");
properties. addNodeProperty Association( NodeProperties. LABEL, "d3"); // Default node label used by yEd from yworks.com.
properties. addNodeProperty Association( NodeProperties. X, "x");
properties. addNodeProperty Association( NodeProperties. Y, "y");
properties. addNodeProperty Association( NodeProperties. Z, "z");
properties. addNodeProperty Association( NodeProperties. SIZE, "size");
..
public ImporterGraphML() {
//Default node associations
//Default edge associations
properties. addEdgeProperty Association( EdgeProperties. LABEL, "label");
properties. addEdgeProperty Association( EdgeProperties. LABEL, "edgelabel");
properties. addEdgeProperty Association( EdgeProperties. LABEL, "d7"); // Default edge label used by yEd from yworks.com.
properties. addEdgeProperty Association( EdgeProperties. WEIGHT, "weight");
properties. addEdgeProperty Association( EdgeProperties. ID, "id");
properties. addEdgeProperty Association( EdgeProperties. ID, "edgeid");
}