Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/minfo/BedHeightEpoch.java @ 4255:670e98f5a441
Fixed leak while merging facets.
The ThemeList that is used by OutputHelper to sort the
Facets for an Output now uses a list to store the ManagedFacets.
The correct order is made up by sorting the List using
Collections.sort() function of the Java JDK. Therfore, the
ManagedFacet class implements the Comparable interface. The
return value of its compareTo(other) method depends on the
value of the 'position' field.
author | Ingo Weinzierl <weinzierl.ingo@googlemail.com> |
---|---|
date | Thu, 25 Oct 2012 14:01:46 +0200 |
parents | bce2dd4310a6 |
children |
rev | line source |
---|---|
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model.minfo; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 import java.util.Date; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 public class BedHeightEpoch |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 extends BedHeight |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
10 protected Date start; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 protected Date end; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 public BedHeightEpoch() { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 this.start = new Date(); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 this.end = new Date(); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 public BedHeightEpoch(String name) { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
19 super(name); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 this.start = new Date(); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 this.end = new Date(); |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 public void add( |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 double value, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 double station, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 Date start, |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 Date end |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 ) { |
3897
bce2dd4310a6
MINFO: Updated data fields to fit the needs of bedheight difference calculation.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
3886
diff
changeset
|
30 super.add(value, station); |
3886
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 this.start = start; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 this.end = end; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 public Date getStart() { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 return start; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 public Date getEnd() { |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 return end; |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 } |
633fbb61a0cc
Split bed heights into bed height epochs and single bed heights.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 } |