0

I am new to Prefuse.I am facing problem reading the polbooks.gml file using GraphML Reader. It can successfully read a xml file but not a gml file.Please suggest a solution how to read a gml file in Prefuse. Below is my code for GraphML Reader

package practise;

import prefuse.data.Graph;
import prefuse.data.io.DataIOException;
import prefuse.data.io.GraphMLReader;

public class practise1 {
static Graph graph = null;
public static void main(String[] args){

try{
    graph=new GraphMLReader().readGraph("polbooks.gml");
}
catch(DataIOException e){
    System.out.print("File Not Found");
}
//System.out.print(graph.getDegree(2));
}
  }
skjindal93
  • 706
  • 1
  • 16
  • 34

1 Answers1

0

Prefuse currently doesn't have a GML reader, only a graphml reader. There is a gml reader that may work here:

http://nwb.cns.iu.edu/svn/nwb/trunk/plugins/visualization/edu.iu.nwb.visualization.prefuse.alpha.smallworld/src/edu/iu/nwb/visualization/prefuse/alpha/smallworld/types/GMLGraphReader.java

bcr
  • 1,328
  • 11
  • 27