Search in sources :

Example 1 with RefDataImport

use of org.openlca.io.refdata.RefDataImport in project olca-app by GreenDelta.

the class Main method create.

private static void create(String name, String dataDir) throws Exception {
    System.out.println("  Create " + name + " database ...");
    var db = new Derby(F("build/" + name));
    if (dataDir != null) {
        new RefDataImport(F("data/" + dataDir), db).run();
        if ("all".equals(dataDir)) {
            importDQS(db);
            GeoImport.on(db);
        }
    }
    db.close();
    System.out.println("  done");
}
Also used : Derby(org.openlca.core.database.Derby) RefDataImport(org.openlca.io.refdata.RefDataImport)

Example 2 with RefDataImport

use of org.openlca.io.refdata.RefDataImport in project olca-app by GreenDelta.

the class XRefDataImport method run.

@Override
public void run() {
    File dir = FileChooser.selectFolder();
    if (dir == null)
        return;
    Cache.evictAll();
    RefDataImport refImport = new RefDataImport(dir, Database.get());
    App.run("Import reference data", refImport, () -> {
        Cache.evictAll();
        Navigator.refresh();
    });
}
Also used : RefDataImport(org.openlca.io.refdata.RefDataImport) File(java.io.File)

Aggregations

RefDataImport (org.openlca.io.refdata.RefDataImport)2 File (java.io.File)1 Derby (org.openlca.core.database.Derby)1