use of it.uniroma1.dis.wsngroup.gexf4j.core.GexfWriter in project gridss by PapenfussLab.
the class GexfHelper method saveTo.
public static void saveTo(Gexf graph, File file) {
file.getAbsoluteFile().getParentFile().mkdir();
GexfWriter graphWriter = new StaxGraphWriter();
Writer out = null;
try {
out = new FileWriter(file, false);
graphWriter.writeToStream(graph, out, "UTF-8");
} catch (IOException e) {
log.error(String.format("Error writing graph visualisation to %s", file), e);
} finally {
CloserUtil.close(out);
CloserUtil.close(graphWriter);
}
}
Aggregations