annotate gnv-artifacts/src/main/java/de/intevation/gnv/timeseries/gap/DefaultTimeGap.java @ 1119:7c4f81f74c47

merged gnv-artifacts
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:00 +0200
parents f953c9a559d8
children
rev   line source
1115
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
1 /*
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
3 *
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
5 * Read the file LGPL.txt coming with the software for details
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
7 */
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 836
diff changeset
8
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 package de.intevation.gnv.timeseries.gap;
779
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 778
diff changeset
10
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 /**
810
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
12 * The default implementation of <code>TimeGap</code>.
835
2423cefe7d39 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 810
diff changeset
13 *
780
c4156275c1e1 Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 779
diff changeset
14 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 */
810
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
16 public class DefaultTimeGap implements TimeGap {
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 /**
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 * The UNIT of the TimeGap
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 * See the Constants in de.intevation.gnv.timeseries.gap.TimeGap
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 */
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 private String unit;
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 461
diff changeset
23
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 /**
461
3ddc22aab764 Removed Encodingerrors from listed Files. All Files are now UTF-8 compliant.
Tim Englich <tim.englich@intevation.de>
parents: 217
diff changeset
25 * The Key of the TimeGap which must be equivalent to the
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 * Key used in the DWH
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 */
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 private int key;
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 461
diff changeset
29
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 /**
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31 * The Value of the Gap.
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 * Use the Unit and the Time Constants to Calculate the
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 * value in Milliseconds
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 */
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 private int value;
778
9a828e5a2390 Removed trailing whitespace
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 461
diff changeset
36
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 /**
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
38 * Constructor
810
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
39 *
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
40 * @param unit Unit of this value.
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
41 * @param key The key of this time gap.
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
42 * @param value The value of this gap.
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 */
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 public DefaultTimeGap(String unit, int key, int value) {
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 super();
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 this.unit = unit;
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 this.key = key;
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 this.value = value;
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 }
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50
810
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
51
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 public String getUnit() {
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 return this.unit;
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 }
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55
810
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
56
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 public int getKey() {
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 return this.key;
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
59 }
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
60
810
991e13c3d504 Added Javadoc in timeseries package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 780
diff changeset
61
217
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
62 public int getValue() {
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
63 return this.value;
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
64 }
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
65
3dcd2b0b456e Added configurable TimeGap Support to the TimeSeries-Chart-Generation. issu45
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66 }
836
05bf8534a35a Using unix line endings only.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 835
diff changeset
67 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org