annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/Timerange.java @ 3784:9f9d5ada96ca

Merged revisions 5498-5499 via svnmerge from file:///home/clients/bsh/bsh-generischer-viewer/Material/SVN/flys-artifacts/trunk ........ r5498 | rrenkert | 2012-09-17 16:38:47 +0200 (Mo, 17 Sep 2012) | 3 lines Refactor MINFO bed quality resultsets and facets. ........ r5499 | rrenkert | 2012-09-17 16:47:05 +0200 (Mo, 17 Sep 2012) | 2 lines Fixed date range in minfo bed quality result. ........ flys-artifacts/tags/2.9.1@5530 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 19 Sep 2012 14:56:13 +0000
parents 2e6f0ef36352
children
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.io.Serializable;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4
2227
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
5 import java.util.Date;
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
6
2217
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 /**
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 * This class represents time ranges specified by start and end time. Start and
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 * end times are stored as long (number of milliseconds since january 1, 1970).
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 * @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
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 public class Timerange implements Serializable {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 private long start;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 private long end;
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 Timerange(long start, long end) {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 this.start = start;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 this.end = end;
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
2227
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
26 public Timerange(Date start, Date stop) {
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
27 this.start = start.getTime();
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
28 this.end = stop != null ? stop.getTime() : System.currentTimeMillis();
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
29 }
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
30
2e6f0ef36352 Added a new constructor to Timerange that takes Date objects for start and end.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2217
diff changeset
31
2217
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 public long getStart() {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 return start;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 }
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 public long getEnd() {
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 return end;
54422e31dc27 Added new model classes which will be used during historical discharge curve calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 }
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 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org