# HG changeset patch # User Felix Wolfsteller # Date 1371030739 -7200 # Node ID 33ccce4a3aae8d1d0fc60d92d7d42bcf34852dae # Parent db7d0600d39df9006155bc16ad9579d2be12217b WaterlevelDifferencesParser: issue1354/1, set timeintervals from waterdiff-csvs. diff -r db7d0600d39d -r 33ccce4a3aae 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 11:52:19 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); }