GraphML importer doesn't import node labels data

Bug #581629 reported by Mathieu Bastian
10
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">ABC</data>
</node>

Tags: graphml
Changed in gephi:
status: Confirmed → Fix Committed
Revision history for this message
rborgan (raymond-borgan) wrote :

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 {
..
    public ImporterGraphML() {
        //Default node associations
        properties.addNodePropertyAssociation(NodeProperties.LABEL, "label");
        properties.addNodePropertyAssociation(NodeProperties.LABEL, "d3"); // Default node label used by yEd from yworks.com.
        properties.addNodePropertyAssociation(NodeProperties.X, "x");
        properties.addNodePropertyAssociation(NodeProperties.Y, "y");
        properties.addNodePropertyAssociation(NodeProperties.Z, "z");
        properties.addNodePropertyAssociation(NodeProperties.SIZE, "size");

        //Default edge associations
        properties.addEdgePropertyAssociation(EdgeProperties.LABEL, "label");
        properties.addEdgePropertyAssociation(EdgeProperties.LABEL, "edgelabel");
        properties.addEdgePropertyAssociation(EdgeProperties.LABEL, "d7"); // Default edge label used by yEd from yworks.com.
        properties.addEdgePropertyAssociation(EdgeProperties.WEIGHT, "weight");
        properties.addEdgePropertyAssociation(EdgeProperties.ID, "id");
        properties.addEdgePropertyAssociation(EdgeProperties.ID, "edgeid");
    }

Changed in gephi:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.