changeset 9011:a44200bf0547

A few directory and file name changes
author mschaefer
date Wed, 18 Apr 2018 07:43:04 +0200
parents dcbdff96d1a8
children abe069eb180c
files backend/src/main/java/org/dive4elements/river/importer/Importer.java backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java backend/src/main/java/org/dive4elements/river/importer/sinfo/parsers/InfrastructureParser.java
diffstat 3 files changed, 11 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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());
--- 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");
         }
--- 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

http://dive4elements.wald.intevation.org