Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/shared/model/FixingsOverviewInfo.java @ 9100:2a1dcee5e54a
2.3.4.1.1 FixAnalysis.HTML header fix
author | gernotbelger |
---|---|
date | Mon, 28 May 2018 16:15:14 +0200 |
parents | 850ce16034e9 |
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; |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 import java.io.Serializable; |
9099 | 12 import java.util.ArrayList; |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 import java.util.List; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 public class FixingsOverviewInfo implements Serializable { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 protected List<FixEvent> events; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 protected String river; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 protected double from; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 protected double to; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 protected int rid; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 protected String html; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 |
9099 | 24 private FixingsOverviewInfo() { |
25 } | |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 |
9099 | 27 public FixingsOverviewInfo(final int rid, final String river, final double from, final double to, final List<FixEvent> events, final String html) { |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 this.rid = rid; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 this.river = river; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 this.from = from; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 this.to = to; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 this.events = new ArrayList<FixEvent>(events); |
9100 | 33 System.out.println(html); |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 this.html = html; |
9100 | 35 |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 public int getRId() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 return this.rid; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 public String getRiver() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 return this.river; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 |
9099 | 46 public double getLowerKm() { |
47 return Math.min(this.from, this.to); | |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 |
9099 | 50 public double getUpperKm() { |
51 return Math.max(this.from, this.to); | |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 |
9099 | 54 // public double getFrom() { |
55 // return this.from < this.to ? this.from : this.to; // TODO: prüfung wieder rausnehmen, hat glaube ich keinen | |
56 // sinnvollen effekt. | |
57 // } | |
58 // | |
59 // public double getTo() { | |
60 // return this.to > this.from ? this.to : this.from; | |
61 // } | |
62 | |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 public List<FixEvent> getEvents() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 return this.events; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 |
9099 | 67 public FixEvent getEventByCId(final String cid) { |
68 for (final FixEvent event : this.events) { | |
6867
0f3dad5d74a2
Client: Removed an XPath eval and simplified a loop.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
69 if (event.getCId().equals(cid)) { |
0f3dad5d74a2
Client: Removed an XPath eval and simplified a loop.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
70 return event; |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 return null; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 public String getHTML() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 return this.html; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 public static class FixEvent implements Serializable { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
81 protected String cid; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 protected String date; |
2536
256b458cc7ea
Changed data field 'name' to 'description' in fix overview.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2505
diff
changeset
|
83 protected String description; |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 protected List<Sector> sectors; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
85 |
9099 | 86 protected FixEvent() { |
87 } | |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
88 |
9099 | 89 public FixEvent(final String cid, final String date, final String description, final List<Sector> sectors) { |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
90 this.cid = cid; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
91 this.date = date; |
2536
256b458cc7ea
Changed data field 'name' to 'description' in fix overview.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2505
diff
changeset
|
92 this.description = description; |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
93 this.sectors = new ArrayList<Sector>(sectors); |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
94 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
95 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
96 public String getCId() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
97 return this.cid; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
98 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
99 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
100 public String getDate() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
101 return this.date; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
102 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
103 |
2536
256b458cc7ea
Changed data field 'name' to 'description' in fix overview.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2505
diff
changeset
|
104 public String getDescription() { |
256b458cc7ea
Changed data field 'name' to 'description' in fix overview.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2505
diff
changeset
|
105 return this.description; |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
106 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
107 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
108 public List<Sector> getSectors() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
109 return this.sectors; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
110 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
111 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
112 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
113 public static class Sector implements Serializable { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
114 protected int cls; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
115 protected double from; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
116 protected double to; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
117 |
9099 | 118 protected Sector() { |
119 } | |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
120 |
9099 | 121 public Sector(final int cls, final double from, final double to) { |
2505
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
122 this.cls = cls; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
123 this.from = from; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
124 this.to = to; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
125 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
126 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
127 public int getCls() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
128 return this.cls; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
129 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
130 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
131 public double getFrom() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
132 return this.from; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
133 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
134 |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
135 public double getTo() { |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
136 return this.to; |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
137 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
138 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
139 } |
87ac5c532523
First part of the UI for fixing analysis parameter.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
140 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |