comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/predefinedtkh/PredefinedTkhColumnAccess.java @ 9016:6e5ff436febe

Added datacage select and chart display for TKH series loaded from database
author mschaefer
date Mon, 23 Apr 2018 15:18:48 +0200
parents
children 611a523fc42f
comparison
equal deleted inserted replaced
9015:baef34f54ee2 9016:6e5ff436febe
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.predefinedtkh;
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 tkh column artifact data
19 *
20 * @author Matthias Schäfer
21 */
22 final class PredefinedTkhColumnAccess extends RangeAccess {
23
24 /***** FIELDS *****/
25
26 private Integer columnId;
27
28 private Integer tkhId;
29
30 private String name;
31
32
33 /***** CONSTRUCTORS *****/
34
35 public PredefinedTkhColumnAccess(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 getTkhId() {
49 if (this.tkhId == null) {
50 this.tkhId = getInteger("tkh_id");
51 }
52 return this.columnId;
53 }
54
55 public Integer getColumnId() {
56 if (this.columnId == null) {
57 this.columnId = getInteger("tkh_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