[PATCH 4 of 5] A few directory and file name changes

Wald Commits scm-commit at wald.intevation.org
Wed Apr 18 07:45:07 CEST 2018


# HG changeset patch
# User mschaefer
# Date 1524030184 -7200
# Node ID a44200bf054751d3f1d550eb2cfd09c3235b35bd
# Parent  dcbdff96d1a8f0db6364c8d4d962a4d7a06c3903
A few directory and file name changes

diff -r dcbdff96d1a8 -r a44200bf0547 backend/src/main/java/org/dive4elements/river/importer/Importer.java
--- a/backend/src/main/java/org/dive4elements/river/importer/Importer.java	Wed Apr 18 07:42:06 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/Importer.java	Wed Apr 18 07:43:04 2018 +0200
@@ -31,6 +31,8 @@
 /** Data Importer. Further processing happens per-river. */
 public class Importer
 {
+    static final String VERSION = "3.3.0";
+
     /** Private log. */
     private static final Logger log = Logger.getLogger(Importer.class);
 
@@ -129,6 +131,7 @@
 
         configureLogging();
 
+        log.info("IMPORTER version " + VERSION);
         log.info("START parsing rivers...");
 
         final InfoGewParser infoGewParser = new InfoGewParser(getAnnotationClassifier());
diff -r dcbdff96d1a8 -r a44200bf0547 backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java
--- a/backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java	Wed Apr 18 07:42:06 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java	Wed Apr 18 07:43:04 2018 +0200
@@ -50,9 +50,8 @@
         INFRASTRUCTURE("Infrastrukturen_BWaStr"), //
         CHANNEL("Zu_gewaehrleistende_Fahrrinnenverhaeltnisse"), //
         COLLISION_EINZEL("Grundberuehrungen" + File.separator + "Einzeljahre"), //
-        TKH_EINZEL("Transportkoerperhoehen" + File.separator + "Einzeljahre"), //
-        TKH_EPOCHE("Transportkoerperhoehen" + File.separator + "Epochen"), //
-        TKH_MODELL("Transportkoerperhoehen" + File.separator + "Modellergebnisse"), //
+        TKH_NATUR("Transportkoerperhoehen" + File.separator + "Naturmessungen"), //
+        TKH_BERECHNUNG("Transportkoerperhoehen" + File.separator + "Berechnungsergebnisse"), //
         FLOW_DEPTH("Modellierte_Datensaetze" + File.separator + "Fliesstiefen"), //
         DEPTH_EVOLUTION_AKTUELL("Fliesstiefenentwicklung" + File.separator + "Bezug_aktueller_GlW"), //
         DEPTH_EVOLUTION_ETAPPEN("Fliesstiefenentwicklung" + File.separator + "GlW-Etappen");
@@ -150,12 +149,10 @@
         }
         if (!TkhParser.shallSkip()) {
             boolean added = false;
-            added = this.parsers.addAll(TkhParser.createParsers(SInfoDirName.TKH_EINZEL.buildPath(this.rootDir),
-                    SInfoDirName.TKH_EINZEL.getFile(), river));
-            added |= this.parsers.addAll(TkhParser.createParsers(SInfoDirName.TKH_EPOCHE.buildPath(this.rootDir),
-                    SInfoDirName.TKH_EPOCHE.getFile(), river));
-            added |= this.parsers.addAll(TkhParser.createParsers(SInfoDirName.TKH_MODELL.buildPath(this.rootDir),
-                    SInfoDirName.TKH_MODELL.getFile(), river));
+            added = this.parsers.addAll(TkhParser.createParsers(SInfoDirName.TKH_NATUR.buildPath(this.rootDir),
+                    SInfoDirName.TKH_NATUR.getFile(), river));
+            added |= this.parsers.addAll(TkhParser.createParsers(SInfoDirName.TKH_BERECHNUNG.buildPath(this.rootDir),
+                    SInfoDirName.TKH_BERECHNUNG.getFile(), river));
             if (!added)
                 log.info("Tkh: no files found");
         }
diff -r dcbdff96d1a8 -r a44200bf0547 backend/src/main/java/org/dive4elements/river/importer/sinfo/parsers/InfrastructureParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/sinfo/parsers/InfrastructureParser.java	Wed Apr 18 07:42:06 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/sinfo/parsers/InfrastructureParser.java	Wed Apr 18 07:43:04 2018 +0200
@@ -110,8 +110,8 @@
     }
 
     @Override
-    protected boolean kmMustBeUnique() {
-        return false;
+    protected KmMode kmMode() {
+        return KmMode.NONE;
     }
 
     @Override
@@ -193,10 +193,6 @@
                 this.headerParsingState = ParsingState.STOP;
                 return false;
             }
-            if (!this.metaPatternsMatched.contains(META_TYPE) || !this.metaPatternsMatched.contains(META_YEAR)) {
-                logError("Required meta info for infrastructure type and/or year is missing");
-                this.headerParsingState = ParsingState.STOP;
-            }
             return true;
         }
         else


More information about the Dive4Elements-commits mailing list