annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java @ 3344:cb376f48dd37 2.8

merged flys-backend/2.8
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:36 +0200
parents ae14f412ba10
children e7a67407dea1
rev   line source
3209
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.access;
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 import de.intevation.flys.artifacts.FLYSArtifact;
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4
3210
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
5 import de.intevation.flys.artifacts.model.DateRange;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
6
3209
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 import org.apache.log4j.Logger;
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 public class SQRelationAccess
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 extends Access
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 {
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 private static Logger log = Logger.getLogger(SQRelationAccess.class);
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13
3210
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
14 protected String river;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
15
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
16 protected Double location;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
17
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
18 protected DateRange [] periods;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
19
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
20 protected Double outliers;
3209
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 public SQRelationAccess() {
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 }
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 public SQRelationAccess(FLYSArtifact artifact) {
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 super(artifact);
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27 }
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 public String getRiver() {
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 if (river == null) {
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 river = getString("river");
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 }
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 if (log.isDebugEnabled()) {
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 log.debug("river: '" + river + "'");
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35 }
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 return river;
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 }
3210
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
38
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
39 public Double getLocation() {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
40 if (location == null) {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
41 // XXX: The parameter name suggests plural!?
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
42 location = getDouble("ld_locations");
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
43 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
44
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
45 if (log.isDebugEnabled()) {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
46 log.debug("location: " + location);
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
47 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
48
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
49 return location;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
50 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
51
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
52 public DateRange [] getPeriods() {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
53 if (periods == null) {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
54 periods = getDateRange("periods");
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
55 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
56 return periods;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
57 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
58
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
59 public Double getOutliers() {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
60 if (outliers == null) {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
61 outliers = getDouble("outliers");
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
62 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
63 if (log.isDebugEnabled()) {
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
64 log.debug("outliers: " + outliers);
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
65 }
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
66 return outliers;
ae14f412ba10 SQ: finished the access stuff.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 3209
diff changeset
67 }
3209
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
68 }
03fc05655258 SQ: Added artifact access stub.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
69 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org