use of org.openlca.jsonld.ZipStore in project olca-app by GreenDelta.
the class JsonImportWizard method doRun.
private void doRun(File zip) throws Exception {
UpdateMode mode = settingsPage.updateMode;
var log = LoggerFactory.getLogger(getClass());
log.info("Import JSON LD package {} with update mode = {}", zip, mode);
getContainer().run(true, true, (monitor) -> {
monitor.beginTask(M.Import, IProgressMonitor.UNKNOWN);
try (ZipStore store = ZipStore.open(zip)) {
JsonImport importer = new JsonImport(store, Database.get());
importer.setUpdateMode(mode);
importer.run();
} catch (Exception e) {
throw new InvocationTargetException(e);
}
});
}
Aggregations