annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WQTimerange.java @ 3272:31168ac9c7e7

Partial fix for issue694 (heightmarks snap to nearest cross section). flys-artifacts/trunk@4916 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 10 Jul 2012 15:31:56 +0000
parents b8df8d1476ba
children 200e70f31f6f
rev   line source
2217
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import java.util.ArrayList;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import java.util.List;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 /**
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 */
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 public class WQTimerange extends WQ {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 protected List<Timerange> ts;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 public WQTimerange() {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 super("");
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 }
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 public WQTimerange(String name) {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 super(name);
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 ts = new ArrayList<Timerange>();
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 }
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 public void add(double w, double q, Timerange t) {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 ws.add(w);
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 qs.add(q);
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 ts.add(t);
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 }
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
2239
e7843533f086 Improved WQTimerange and HistoricalDischargeFacet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
33 public Timerange getTimerange(int idx) {
e7843533f086 Improved WQTimerange and HistoricalDischargeFacet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
34 return ts.get(idx);
e7843533f086 Improved WQTimerange and HistoricalDischargeFacet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
35 }
e7843533f086 Improved WQTimerange and HistoricalDischargeFacet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
36
e7843533f086 Improved WQTimerange and HistoricalDischargeFacet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
37
2217
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 public Timerange[] getTimeranges() {
2311
b8df8d1476ba Compute differences between discharge table values and reference discharge table values in historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2239
diff changeset
39 return (Timerange[]) ts.toArray(new Timerange[ts.size()]);
2217
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 }
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 }
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org