Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/access/SQRelationAccess.java @ 5831:bd047b71ab37
Repaired internal references
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:06:39 +0200 |
parents | flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java@aaf810d4ec82 |
children |
comparison
equal
deleted
inserted
replaced
5830:160f53ee0870 | 5831:bd047b71ab37 |
---|---|
1 package org.dive4elements.river.artifacts.access; | |
2 | |
3 import java.util.Date; | |
4 | |
5 import org.apache.log4j.Logger; | |
6 | |
7 import org.dive4elements.river.artifacts.FLYSArtifact; | |
8 import org.dive4elements.river.artifacts.model.DateRange; | |
9 | |
10 public class SQRelationAccess | |
11 extends RiverAccess | |
12 { | |
13 private static Logger log = Logger.getLogger(SQRelationAccess.class); | |
14 | |
15 protected Double location; | |
16 | |
17 protected DateRange period; | |
18 | |
19 protected Double outliers; | |
20 | |
21 private String method; | |
22 | |
23 public SQRelationAccess() { | |
24 } | |
25 | |
26 public SQRelationAccess(FLYSArtifact artifact) { | |
27 super(artifact); | |
28 } | |
29 | |
30 public Double getLocation() { | |
31 if (location == null) { | |
32 // XXX: The parameter name suggests plural!? | |
33 location = getDouble("ld_locations"); | |
34 } | |
35 | |
36 if (log.isDebugEnabled()) { | |
37 log.debug("location: " + location); | |
38 } | |
39 | |
40 return location; | |
41 } | |
42 | |
43 public DateRange getPeriod() { | |
44 if (period == null) { | |
45 Long start = getLong("start"); | |
46 Long end = getLong("end"); | |
47 | |
48 if (start != null && end != null) { | |
49 period = new DateRange(new Date(start), new Date(end)); | |
50 } | |
51 } | |
52 | |
53 return period; | |
54 } | |
55 | |
56 public Double getOutliers() { | |
57 if (outliers == null) { | |
58 outliers = getDouble("outliers"); | |
59 } | |
60 if (log.isDebugEnabled()) { | |
61 log.debug("outliers: " + outliers); | |
62 } | |
63 return outliers; | |
64 } | |
65 | |
66 public String getOutlierMethod() { | |
67 if (method == null) { | |
68 method = getString("outlier-method"); | |
69 } | |
70 if (log.isDebugEnabled()) { | |
71 log.debug("outlier-method: " + method); | |
72 } | |
73 return method; | |
74 } | |
75 } | |
76 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |