[Dive4elements-commits] [PATCH 08 of 13] W80Parser: Use DateGuesser to set a date
Wald Commits
scm-commit at wald.intevation.org
Fri Jan 4 11:12:47 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1357294348 -3600
# Node ID c6654a19b00fe7f8841626eaff230b6b3af6db9c
# Parent ab87408bb0d31f5e4216274c40ff8fd00d255ff7
W80Parser: Use DateGuesser to set a date.
diff -r ab87408bb0d3 -r c6654a19b00f flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java Fri Jan 04 11:11:52 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/W80Parser.java Fri Jan 04 11:12:28 2013 +0100
@@ -7,6 +7,8 @@
import de.intevation.flys.utils.EpsilonComparator;
import de.intevation.flys.importer.parsers.tim.Coordinate;
+import de.intevation.flys.utils.DateGuesser;
+
import java.io.File;
import java.io.IOException;
@@ -81,7 +83,9 @@
/** Get the year of this cross sections measurement. */
@Override
public Integer getYear() {
- return null;
+ Calendar dateCalendar = Calendar.getInstance();
+ dateCalendar.setTime(anchorDate);
+ return dateCalendar.get(Calendar.YEAR);
}
@@ -221,6 +225,7 @@
currentLine = new ArrayList<XY>();
data.put(stationKm, currentLine);
currentLine.add(new XY(0d, heightM,0));
+ anchorDate = DateGuesser.guessDate(date);
}
else {
addPoint(gkRightKm, gkHighKm, heightM, pointIndex);
More information about the Dive4elements-commits
mailing list