use of org.gephi.io.importer.plugin.file.spreadsheet.process.ImportAdjacencyListProcess in project gephi by gephi.
the class AbstractImporterSpreadsheet method execute.
@Override
public boolean execute(ContainerLoader container) {
this.container = container;
this.report = new Report();
this.container.setTimeRepresentation(generalConfig.getTimeRepresentation());
this.container.setTimeZone(generalConfig.getTimeZone());
try (SheetParser parser = createParser()) {
switch(getMode()) {
case NODES_TABLE:
importer = new ImportNodesProcess(generalConfig, parser, container, progressTicket);
break;
case EDGES_TABLE:
importer = new ImportEdgesProcess(generalConfig, parser, container, progressTicket);
break;
case ADJACENCY_LIST:
importer = new ImportAdjacencyListProcess(generalConfig, container, progressTicket, parser);
break;
case MATRIX:
importer = new ImportMatrixProcess(generalConfig, container, progressTicket, parser);
break;
default:
throw new IllegalArgumentException("Unknown mode " + getMode());
}
importer.execute();
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
} finally {
if (importer != null) {
report.append(importer.getReport());
importer = null;
}
}
return !cancel;
}
Aggregations