Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadData.java @ 8240:61fd22f65bd4
(issue1448) Actually filter out not matching sq_time_interval_ids
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 08 Sep 2014 19:48:17 +0200 |
parents | b207eeb66edd |
children | f8ea1a7ecde6 |
comparison
equal
deleted
inserted
replaced
8239:b207eeb66edd | 8240:61fd22f65bd4 |
---|---|
14 import java.util.Comparator; | 14 import java.util.Comparator; |
15 import java.util.Date; | 15 import java.util.Date; |
16 import java.util.List; | 16 import java.util.List; |
17 import java.util.TreeMap; | 17 import java.util.TreeMap; |
18 import java.util.TreeSet; | 18 import java.util.TreeSet; |
19 import java.util.Iterator; | |
19 | 20 |
20 import org.apache.log4j.Logger; | 21 import org.apache.log4j.Logger; |
21 | 22 |
22 import org.dive4elements.river.backend.utils.EpsilonComparator; | 23 import org.dive4elements.river.backend.utils.EpsilonComparator; |
23 | 24 |
461 public void visit(Station station) { | 462 public void visit(Station station) { |
462 station.allLoads(loads); | 463 station.allLoads(loads); |
463 } | 464 } |
464 }); | 465 }); |
465 | 466 |
467 /* This may not be the most beautiful thing to do but well,.. */ | |
468 for (Iterator<Load> it = loads.iterator(); it.hasNext();) { | |
469 Integer obj = it.next().getSQRelationTimeIntervalId(); | |
470 if ((obj == null && sqRelationTimeInterval != null) || | |
471 (obj != null && !obj.equals(sqRelationTimeInterval))) { | |
472 it.remove(); | |
473 } | |
474 } | |
475 | |
466 return loads; | 476 return loads; |
467 } | 477 } |
468 | 478 |
469 /** Get a list of loads with unique sq_time_intervals. | 479 /** Get a list of loads with unique sq_time_intervals. |
470 * | 480 * |