Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/shared/model/WQInfoRecord.java @ 9227:84397da33d17
Allow to control specific behaviour in TwinDatacagePanel
Implemented client logic of 'intelligent datacage filtering' for SINFO
author | gernotbelger |
---|---|
date | Wed, 04 Jul 2018 18:28:08 +0200 |
parents | 2ca1f3991e17 |
children |
rev | line source |
---|---|
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5993
ea9eef426962
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5861
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5993
ea9eef426962
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5861
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5835
821a02bbfb4e
Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5834
diff
changeset
|
9 package org.dive4elements.river.client.shared.model; |
245
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 |
7557
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
11 import java.util.Date; |
245
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 import com.smartgwt.client.widgets.grid.ListGridRecord; |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 /** |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 * The WQInfoRecord is a wrapper to put WQ Info objects into |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 * a ListGrid. |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 * |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 */ |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 public class WQInfoRecord extends ListGridRecord { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 /** The artifact collection. */ |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 protected WQInfoObject wqInfo; |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 /** |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 * The default constructor. |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 * |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 * @param info The wq info object. |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 */ |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 public WQInfoRecord(WQInfoObject info) { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 this.wqInfo = info; |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 setName(info.getName()); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 setType(info.getType()); |
6371
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
37 setValue(info.getValue()); |
7557
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
38 setStartTime(info.getStartTime()); |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
39 setStopTime(info.getStopTime()); |
6371
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
40 setOfficial(info.isOfficial() ? "X" : ""); |
245
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 public void setName(String name) { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 setAttribute("name", name); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 public String getName() { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
50 return getAttributeAsString("name"); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 public void setType(String type) { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 setAttribute("type", type); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 public String getType() { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 return getAttributeAsString("type"); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 public void setValue(double value) { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 setAttribute("value", value); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 public double getValue() { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 return getAttributeAsDouble("value"); |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 |
7557
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
72 public void setStartTime(Date value) { |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
73 setAttribute("starttime", value); |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
74 } |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
75 |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
76 public Date getStartTime() { |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
77 return getAttributeAsDate("starttime"); |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
78 } |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
79 |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
80 public void setStopTime(Date value) { |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
81 setAttribute("stoptime", value); |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
82 } |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
83 |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
84 public Date getStopTime() { |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
85 return getAttributeAsDate("stoptime"); |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
86 } |
2ca1f3991e17
issue1542: Make WQInfoObjects and server provide start and end date for mainvalues, display in table.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
6371
diff
changeset
|
87 |
6371
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
88 public void setOfficial(String value) { |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
89 setAttribute("official", value); |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
90 } |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
91 |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
92 public String getOfficial() { |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
93 return getAttributeAsString("official"); |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
94 } |
19459037b3c7
GWT client: Display official lines in helper panels.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
95 |
245
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
96 |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
97 public WQInfoObject getWQInfo() { |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
98 return wqInfo; |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
100 } |
1e73d5a4859c
Added new WQ info service and data structures.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
101 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |