Hello! I am looking for an hint to what I’m doing wrong with the GraphStream library; I want to use it to convert a Graphviz file (with FileSourceDOT) to a GraphML file (with FileSinkGML). Having set up infile and outfile as the names of the input and output, > FileSourceDOT reader = new FileSourceDOT(); > FileSinkGML writer = new FileSinkGML(); > Graph graph = new MultiGraph("graph", true, false); > > reader.addSink(graph); > reader.readAll(infile); // IdAlreadyInUseException here > writer.writeAll(graph, outfile); I get an exception thrown from the readAll method: Exception in thread "main" org.graphstream.graph.IdAlreadyInUseException: singleton exception: id 'ICD9Code' already used, cannot add node at org.graphstream.graph.implementations.DefaultGraph.addNode_(DefaultGraph.java:426) … at com.idfbins.gsanders.dot2gml.Main.main(Main.java:26) The exception mentions the same id, “ICD9Code”, on every run. This makes me think I’m missing an initialization step or using the wrong kind of Graph object. So far I can’t see what to change, so any suggestions are welcome! -gws |
Archives gérées par MHonArc 2.6.16.