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