Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedloadOverview.java @ 8684:2e11fc7f5d35
(issue1796) Use seddb name of a river when accessing the seddb
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 13 Apr 2015 11:26:44 +0200 |
parents | af13ceeba52a |
children | 4289930e276c |
comparison
equal
deleted
inserted
replaced
8683:cfafe5764509 | 8684:2e11fc7f5d35 |
---|---|
20 import org.hibernate.type.StandardBasicTypes; | 20 import org.hibernate.type.StandardBasicTypes; |
21 import org.w3c.dom.Document; | 21 import org.w3c.dom.Document; |
22 import org.w3c.dom.Element; | 22 import org.w3c.dom.Element; |
23 | 23 |
24 import org.dive4elements.river.utils.KMIndex; | 24 import org.dive4elements.river.utils.KMIndex; |
25 import org.dive4elements.river.artifacts.model.RiverFactory; | |
25 | 26 |
26 public class BedloadOverview implements Serializable { | 27 public class BedloadOverview implements Serializable { |
27 | 28 |
28 private static Logger log = Logger.getLogger(BedloadOverview.class); | 29 private static Logger log = Logger.getLogger(BedloadOverview.class); |
29 | 30 |
106 entries = new KMIndex<List<Date>>(); | 107 entries = new KMIndex<List<Date>>(); |
107 } | 108 } |
108 | 109 |
109 public BedloadOverview(String riverName) { | 110 public BedloadOverview(String riverName) { |
110 this(); | 111 this(); |
111 this.riverName = riverName; | 112 this.riverName = RiverFactory.getRiver(riverName).nameForSeddb(); |
112 } | 113 } |
113 | 114 |
114 private static final boolean epsilonEquals(double a, double b) { | 115 private static final boolean epsilonEquals(double a, double b) { |
115 return Math.abs(a - b) < EPSILON; | 116 return Math.abs(a - b) < EPSILON; |
116 } | 117 } |