Search in sources :

Example 1 with ExportBackgroundJob

use of annis.gui.controller.ExportBackgroundJob in project ANNIS by korpling.

the class QueryController method executeExport.

public void executeExport(ExportPanel panel, EventBus eventBus) {
    Future exportFuture = state.getExecutedTasks().get(QueryUIState.QueryType.EXPORT);
    if (exportFuture != null && !exportFuture.isDone()) {
        exportFuture.cancel(true);
    }
    ExportQuery query = getExportQuery();
    addHistoryEntry(query);
    ExporterPlugin exporterImpl = ui.getExporter(query.getExporter());
    exportFuture = Background.call(new ExportBackgroundJob(query, exporterImpl, ui, eventBus, panel));
    state.getExecutedTasks().put(QueryUIState.QueryType.EXPORT, exportFuture);
}
Also used : ExporterPlugin(annis.libgui.exporter.ExporterPlugin) Future(java.util.concurrent.Future) ExportQuery(annis.gui.objects.ExportQuery) ExportBackgroundJob(annis.gui.controller.ExportBackgroundJob)

Aggregations

ExportBackgroundJob (annis.gui.controller.ExportBackgroundJob)1 ExportQuery (annis.gui.objects.ExportQuery)1 ExporterPlugin (annis.libgui.exporter.ExporterPlugin)1 Future (java.util.concurrent.Future)1