Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefineddepthevol/PredefinedDepthEvolAccess.java @ 9033:384eee4b4135
Added datacage select and chart display for flow depth evolution series loaded from database, and a correction for the tkh data
author | mschaefer |
---|---|
date | Fri, 27 Apr 2018 17:41:59 +0200 |
parents | |
children | 611a523fc42f |
comparison
equal
deleted
inserted
replaced
9032:1f63e9d3b0ec | 9033:384eee4b4135 |
---|---|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 | |
11 package org.dive4elements.river.artifacts.sinfo.predefineddepthevol; | |
12 | |
13 import org.apache.commons.lang.math.DoubleRange; | |
14 import org.dive4elements.river.artifacts.D4EArtifact; | |
15 import org.dive4elements.river.artifacts.access.RangeAccess; | |
16 | |
17 /** | |
18 * Access to the database loaded depth evolution artifact data | |
19 * | |
20 * @author Matthias Schäfer | |
21 */ | |
22 final class PredefinedDepthEvolAccess extends RangeAccess { | |
23 | |
24 /***** FIELDS *****/ | |
25 | |
26 private Integer id; | |
27 | |
28 private String name; | |
29 | |
30 | |
31 /***** CONSTRUCTORS *****/ | |
32 | |
33 public PredefinedDepthEvolAccess(final D4EArtifact artifact) { | |
34 super(artifact); | |
35 } | |
36 | |
37 | |
38 /***** METHDOS *****/ | |
39 | |
40 public DoubleRange getRange() { | |
41 final double from = getFrom(); | |
42 final double to = getTo(); | |
43 return new DoubleRange(from, to); | |
44 } | |
45 | |
46 public Integer getId() { | |
47 if (this.id == null) { | |
48 this.id = getInteger("depthevol_id"); | |
49 } | |
50 return this.id; | |
51 } | |
52 | |
53 public String getName() { | |
54 if (this.name == null) { | |
55 this.name = getString("name"); | |
56 } | |
57 return this.name; | |
58 } | |
59 } |