Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/importer/ImporterSession.java @ 8692:67e53dbe05d2
(issue1750) Consistently attach parameters of suspended respectively bedload material to measurement station of respective type.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 17 Apr 2015 15:04:16 +0200 |
parents | 17db08570637 |
children | 32a91eac0bc2 |
comparison
equal
deleted
inserted
replaced
8691:bfca77cbf353 | 8692:67e53dbe05d2 |
---|---|
204 map.put(key, range); | 204 map.put(key, range); |
205 | 205 |
206 return range; | 206 return range; |
207 } | 207 } |
208 | 208 |
209 public MeasurementStation getMeasurementStation( | |
210 River river, | |
211 double station, | |
212 String measurementType | |
213 ) { | |
214 List<MeasurementStation> stations = getMeasurementStations( | |
215 river, station); | |
216 | |
217 if (stations != null) { | |
218 /* Assume there is only one MeasurementStation per type at | |
219 any station. Should be enforced in database schema. */ | |
220 for (MeasurementStation m: stations) { | |
221 if (m.getMeasurementType().equals(measurementType)) { | |
222 return m; | |
223 } | |
224 continue; | |
225 } | |
226 } | |
227 | |
228 return null; | |
229 } | |
230 | |
209 public List<MeasurementStation> getMeasurementStations( | 231 public List<MeasurementStation> getMeasurementStations( |
210 River river, | 232 River river, |
211 double station | 233 double station |
212 ) { | 234 ) { |
213 String rivername = river.getName(); | 235 String rivername = river.getName(); |