changeset 4135:ac93f397018d

Importer: Ignore historical discharge tables.
author Sascha L. Teichmann <teichmann@intevation.de>
date Mon, 15 Oct 2012 14:03:47 +0200
parents 9c78264109ad
children b6ba9bbb5122
files flys-backend/ChangeLog flys-backend/contrib/run_hydr_morph.sh flys-backend/doc/documentation/de/importer-hydr-morph.tex flys-backend/src/main/java/de/intevation/flys/importer/Config.java flys-backend/src/main/java/de/intevation/flys/importer/ImportGauge.java
diffstat 5 files changed, 33 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Mon Oct 15 12:00:28 2012 +0200
+++ b/flys-backend/ChangeLog	Mon Oct 15 14:03:47 2012 +0200
@@ -1,6 +1,18 @@
+2012-10-15  Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/importer/Config.java:
+	  Added new flag 'flys.backend.skip.historical.discharge.tables'
+	  to ignore the historical discharge tables during gauge import.
+
+	* src/main/java/de/intevation/flys/importer/ImportGauge.java:
+	  Ignore the historical discharge tables if flag is set.
+
+	* contrib/run_hydr_morph.sh: Adjusted shell script.
+	* doc/documentation/de/importer-hydr-morph.tex: Adjusted docu.
+
 2012-09-30  Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
-    * .hgignore: First hgignore
+	* .hgignore: First hgignore
 
 2012-09-28  Ingo Weinzierl <ingo@intevation.de>
 
--- a/flys-backend/contrib/run_hydr_morph.sh	Mon Oct 15 12:00:28 2012 +0200
+++ b/flys-backend/contrib/run_hydr_morph.sh	Mon Oct 15 14:03:47 2012 +0200
@@ -25,6 +25,7 @@
 IMPORTER_ANNOTATION_TYPES="conf/annotation-types.xml"
 
 IMPORTER_SKIP_GAUGES=false
+IMPORTER_SKIP_HISTORICAL_DISCHARGE_GAUGES=false
 IMPORTER_SKIP_ANNOTATIONS=false
 IMPORTER_SKIP_WST=false
 IMPORTER_SKIP_PRFS=false
@@ -76,6 +77,7 @@
     -Dflys.backend.main.value.types=$IMPORTER_MAINVALUE_TYPES \
     -Dflys.backend.importer.annotation.types=$IMPORTER_ANNOTATION_TYPES \
     -Dflys.backend.importer.dry.run=$IMPORTER_DRY_RUN \
+    -Dflys.backend.importer.skip.historical.discharge.tables=$IMPORTER_SKIP_HISTORICAL_DISCHARGE_GAUGES \
     -Dflys.backend.importer.skip.gauges=$IMPORTER_SKIP_GAUGES \
     -Dflys.backend.importer.skip.annotations=$IMPORTER_SKIP_ANNOTATIONS \
     -Dflys.backend.importer.skip.prfs=$IMPORTER_SKIP_PRFS \
--- a/flys-backend/doc/documentation/de/importer-hydr-morph.tex	Mon Oct 15 12:00:28 2012 +0200
+++ b/flys-backend/doc/documentation/de/importer-hydr-morph.tex	Mon Oct 15 14:03:47 2012 +0200
@@ -59,6 +59,12 @@
 ausgelesen. Es werden nur *.sta-Datei von Pegeln geladen, die in der .glt-Datei
 vermerkt sind.
 
+\subsubsection{Historische Abflusstafeln (*.at-Dateien)}
+Der Import von historischen Abflusstafeln kann mit
+\textbf{'-Dflys.backend.importer.skip.historical.discharge.tables=true'}
+unterdrückt werden. Diese Flagge wird nur ausgewertet, wenn überhaupt
+Pegel-Daten (siehe oben) importiert werden.
+
 Mittels \textbf{-Dflys.backend.sta.parse.gauge.numbers=true'} wird versucht, die
 offiziellen Pegelnummern aus den Stammdaten zu extrahieren.
 \textbf{Dies ist mit Vorsicht zu behandeln, denn die meisten STA-Dateien
--- a/flys-backend/src/main/java/de/intevation/flys/importer/Config.java	Mon Oct 15 12:00:28 2012 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/Config.java	Mon Oct 15 14:03:47 2012 +0200
@@ -17,6 +17,9 @@
     public static final String SKIP_GAUGES =
         "flys.backend.importer.skip.gauges";
 
+    public static final String SKIP_HISTORICAL_DISCHARGE_TABLES =
+        "flys.backend.importer.skip.historical.discharge.tables";
+
     public static final String SKIP_ANNOTATIONS =
         "flys.backend.importer.skip.annotations";
 
@@ -100,6 +103,10 @@
         return getFlag(SKIP_GAUGES);
     }
 
+    public boolean skipHistoricalDischargeTables() {
+        return getFlag(SKIP_HISTORICAL_DISCHARGE_TABLES);
+    }
+
     public boolean skipAnnotations() {
         return getFlag(SKIP_ANNOTATIONS);
     }
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportGauge.java	Mon Oct 15 12:00:28 2012 +0200
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportGauge.java	Mon Oct 15 14:03:47 2012 +0200
@@ -162,6 +162,11 @@
     }
 
     public void parseHistoricalDischargeTables() throws IOException {
+        if (Config.INSTANCE.skipHistoricalDischargeTables()) {
+            log.info("skip historical discharge tables");
+            return;
+        }
+
         log.info("parse historical discharge tables");
 
         File riverDir = atFile.getParentFile().getParentFile();

http://dive4elements.wald.intevation.org