Hello, I'm Levi Oyster, a student at the University of Alaska Anchorage and I'm working on a research project for Semantic Network analysis. For my part of the work I am to automate network generation of many processed text documents and export one single .gml file so that the it can be used for visualization in Party View and other similar programs. I've had some good success learning your API and tying things together properly but I can not for the life of me get my program to output a .gml file, though I've had success with .gexf and .pdf without issue. I've tried multiple different castings and nothing seems to work, I'm sure I'm missing something very simple and I could very much use your help to continue my research.
Below are few attempts of what I've tried and had no success with. I would really appreciate any assistance on this.
Thank you,
Levi Oyster
////Attempt 1
GraphExporter expGML = Lookup.getDefault().lookup(GraphExporter.class);
expGML.setExportVisible(false);
expGML.setWorkspace(workspace);
expGML.execute();
expGML.setNormalize(true);
ExportController ec = Lookup.getDefault().lookup(ExportController.class);
try
{
ec.exportFile(new File("rankin.gml"), expGML);
} catch (IOException ex) {
ex.printStackTrace();
return;
}
/////////////Attempt 2
Exporter exporterGML = ec.getExporter(".gml");
ExporterGML exporterGML=Lookup.getDefault().lookup(ExporterGML.class);
exporterGML.setWorkspace(workspace);
exporterGML.execute();
try {
ec.exportFile(new File("ranking.gml"), exporterGML);
} catch (IOException ex) {
ex.printStackTrace();
return;
}
/////////////Attempt 3
GraphExporter exporter=(GraphExporter) ec.getExporter(".gml");
exporter.setExportVisible(false);
exporter.setWorkspace(workspace);
try {
ec.exportFile(new File("ranking.gml"), exporter);
} catch (IOException ex) {
ex.printStackTrace();
return;
}
//////////Attempt 4
ExporterGML expGML=Lookup.getDefault().lookup(ExporterGML.class);
ExporterGML expGML=(ExporterGML) ec.getExporter(".gml");
expGML.setWorkspace(workspace);
expGML.setNormalize(true);
try
{
ec.exportFile(new File("ranking.gml"));
}catch (IOException ex)
{
ex.printStackTrace();
return;
}
Exporting GML Files with gephi-toolkit.jar
-
- Posts:2
- Joined:05 Apr 2017 12:46 [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
Re: Exporting GML Files with gephi-toolkit.jar
ExportController ec = Lookup.getDefault().lookup(ExportController.class);
ExporterGML gml = (ExporterGML) ec.getExporter(".gml");
try {
ec.exportFile(new File(filename + ".gml"), gml);
} catch (IOException ex) {
ex.printStackTrace();
}
this works for me
ExporterGML gml = (ExporterGML) ec.getExporter(".gml");
try {
ec.exportFile(new File(filename + ".gml"), gml);
} catch (IOException ex) {
ex.printStackTrace();
}
this works for me