[Lada-commits] [PATCH 1 of 2] Initialize map for ort attributes once and reset attribute indicator for entnahmeOrt

Wald Commits scm-commit at wald.intevation.org
Tue Jan 17 17:29:15 CET 2017


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1484670501 -3600
# Node ID 1d9552e05b76905c5f2d5a4574f7d74b23cf1cb7
# Parent  23b75545dbf0df874ab1895038d03573e9b46110
Initialize map for ort attributes once and reset attribute indicator for entnahmeOrt.

diff -r 23b75545dbf0 -r 1d9552e05b76 src/main/java/de/intevation/lada/importer/laf/LafObjectListener.java
--- a/src/main/java/de/intevation/lada/importer/laf/LafObjectListener.java	Mon Dec 19 11:31:33 2016 +0100
+++ b/src/main/java/de/intevation/lada/importer/laf/LafObjectListener.java	Tue Jan 17 17:28:21 2017 +0100
@@ -39,6 +39,7 @@
         errors = new HashMap<String, List<ReportItem>>();
         currentErrors = new ArrayList<ReportItem>();
         currentUOrt = new HashMap<String, String>();
+        currentEOrt = new HashMap<String, String>();
     }
 
     public LafRawData getData() {
@@ -122,8 +123,10 @@
             currentProbe.addEntnahmeOrt(currentEOrt);
             currentEOrt.clear();
         }
-        currentEOrt = new HashMap<String, String>();
         currentProbe = data.new Probe();
+        hasEKoordinaten = false;
+        hasEGemeinde = false;
+        hasEHerkunfstland = false;
     }
 
     /**
@@ -145,7 +148,6 @@
             currentProbe.addEntnahmeOrt(currentEOrt);
             currentEOrt.clear();
         }
-        currentEOrt = new HashMap<String, String>();
         currentProbe = data.new Probe();
         if (!currentErrors.isEmpty()) {
             errors.put(currentProbe.getIdentifier(),
@@ -153,6 +155,9 @@
         }
         currentErrors.clear();
         currentProbe = null;
+        hasEKoordinaten = false;
+        hasEGemeinde = false;
+        hasEHerkunfstland = false;
         hasDatenbasis = false;
         hasMessprogramm = false;
         hasUmwelt = false;


More information about the Lada-commits mailing list