Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/parsers/SQRelationParser.java @ 7927:07cc4cd9233e
Add new DateUtil class.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Thu, 12 Jun 2014 12:21:55 +0200 |
parents | c894b7b45c4c |
children | 3bb1c62ad732 |
comparison
equal
deleted
inserted
replaced
7926:e3b74679b2b4 | 7927:07cc4cd9233e |
---|---|
20 import org.apache.log4j.Logger; | 20 import org.apache.log4j.Logger; |
21 | 21 |
22 import org.dive4elements.river.importer.ImportSQRelation; | 22 import org.dive4elements.river.importer.ImportSQRelation; |
23 import org.dive4elements.river.importer.ImportSQRelationValue; | 23 import org.dive4elements.river.importer.ImportSQRelationValue; |
24 import org.dive4elements.river.importer.ImportTimeInterval; | 24 import org.dive4elements.river.importer.ImportTimeInterval; |
25 import org.dive4elements.river.utils.DateUtil; | |
25 | 26 |
26 | 27 |
27 public class SQRelationParser extends LineParser { | 28 public class SQRelationParser extends LineParser { |
28 | 29 |
29 private static final Logger log = | 30 private static final Logger log = |
97 try { | 98 try { |
98 int low = nf.parse(lo).intValue(); | 99 int low = nf.parse(lo).intValue(); |
99 int high = nf.parse(hi).intValue(); | 100 int high = nf.parse(hi).intValue(); |
100 | 101 |
101 current.setTimeInterval(new ImportTimeInterval( | 102 current.setTimeInterval(new ImportTimeInterval( |
102 getStartDateFromYear(low), | 103 DateUtil.getStartDateFromYear(low), |
103 getEndDateFromYear(high) | 104 DateUtil.getEndDateFromYear(high) |
104 )); | 105 )); |
105 } | 106 } |
106 catch (ParseException nfe) { | 107 catch (ParseException nfe) { |
107 log.warn("Cannot parse time range.", nfe); | 108 log.warn("Cannot parse time range.", nfe); |
108 } | 109 } |