comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedflowdepth/PredefinedFlowDepthColumnAccess.java @ 9035:c16e90a0baf7

Added datacage select and chart display for modelled flow depth series loaded from database
author mschaefer
date Mon, 30 Apr 2018 16:00:12 +0200
parents
children 611a523fc42f
comparison
equal deleted inserted replaced
9034:8aa7d9eaaa21 9035:c16e90a0baf7
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.predefinedflowdepth;
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 flow depth column artifact data
19 *
20 * @author Matthias Schäfer
21 */
22 final class PredefinedFlowDepthColumnAccess extends RangeAccess {
23
24 /***** FIELDS *****/
25
26 private Integer columnId;
27
28 private Integer seriesId;
29
30 private String name;
31
32
33 /***** CONSTRUCTORS *****/
34
35 public PredefinedFlowDepthColumnAccess(final D4EArtifact artifact) {
36 super(artifact);
37 }
38
39
40 /***** METHDOS *****/
41
42 public DoubleRange getRange() {
43 final double from = getFrom();
44 final double to = getTo();
45 return new DoubleRange(from, to);
46 }
47
48 public Integer getSeriesId() {
49 if (this.seriesId == null) {
50 this.seriesId = getInteger("flowdepth_id");
51 }
52 return this.columnId;
53 }
54
55 public Integer getColumnId() {
56 if (this.columnId == null) {
57 this.columnId = getInteger("flowdepth_col_id");
58 }
59 return this.columnId;
60 }
61
62 public String getName() {
63 if (this.name == null) {
64 this.name = getString("name");
65 }
66 return this.name;
67 }
68 }

http://dive4elements.wald.intevation.org