[Dive4elements-commits] [PATCH 12 of 12] Weird merge

Wald Commits scm-commit at wald.intevation.org
Wed Jun 12 11:51:21 CEST 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1371031217 -7200
# Node ID f812bd5fe2bf1a351790639c245935565b29852a
# Parent  4c2025ec109f5352a345a1acad0136da96a114f3
# Parent  33ccce4a3aae8d1d0fc60d92d7d42bcf34852dae
Weird merge.

diff -r 4c2025ec109f -r f812bd5fe2bf backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java	Wed Jun 12 11:51:25 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WaterlevelDifferencesParser.java	Wed Jun 12 12:00:17 2013 +0200
@@ -20,6 +20,7 @@
 
 import org.apache.log4j.Logger;
 
+import org.dive4elements.river.importer.ImportTimeInterval;
 import org.dive4elements.river.importer.ImportUnit;
 
 import org.dive4elements.river.importer.ImportWst;
@@ -171,9 +172,13 @@
             Matcher m = YEARS_IN_COLUMN.matcher(name);
 
             if (m.matches()) {
-                String startYear = m.group(1);
-                String endYear = m.group(2);
-                // TODO create and set ImportTimeInterval
+                int startYear = Integer.parseInt(m.group(1));
+                int endYear   = Integer.parseInt(m.group(2));
+                ImportTimeInterval time = new ImportTimeInterval(
+                    getStartDateFromYear(startYear),
+                    getEndDateFromYear(endYear)
+                );
+                column.setTimeInterval(time);
             } else {
                 log.debug("No time interval in column header found: " + name);
             }


More information about the Dive4elements-commits mailing list