Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java @ 3208:90c4ce100ce1
Added new base class for *Access
flys-artifacts/trunk@4827 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 28 Jun 2012 14:55:58 +0000 |
parents | babb0798d548 |
children | 03fc05655258 |
rev | line source |
---|---|
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.access; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 import de.intevation.artifactdatabase.data.StateData; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 import de.intevation.flys.artifacts.FLYSArtifact; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.flys.artifacts.model.fixings.DateRange; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 import java.util.Arrays; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 import java.util.Date; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 import org.apache.log4j.Logger; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 public class FixationArtifactAccess |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
15 extends Access |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 private static Logger log = Logger.getLogger(FixationArtifactAccess.class); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 protected String river; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 protected String calculationMode; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 protected Double from; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 protected Double to; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 protected Double step; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 protected Long start; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 protected Long end; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 protected Integer qSectorStart; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 protected Integer qSectorEnd; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 protected DateRange referencePeriod; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 protected DateRange [] analysisPeriods; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 protected int [] events; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 protected Boolean preprocessing; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 protected String function; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 protected double [] qs; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 public FixationArtifactAccess() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 public FixationArtifactAccess(FLYSArtifact artifact) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
48 super(artifact); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
49 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 public String getRiver() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 if (river == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
53 river = getString("river"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 log.debug("river: '" + river + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 return river; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 public String getCalculationMode() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 if (calculationMode == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
63 calculationMode = getString("calculation.mode"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 log.debug("calculationMode: '" + calculationMode + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 return calculationMode; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 public Double getFrom() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
74 if (from == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
75 from = getDouble("from"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 log.debug("from: '" + from + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 return from; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 public Double getTo() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 if (to == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
88 to = getDouble("to"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 log.debug("to: '" + to + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 return to; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 public Double getStep() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 if (step == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
101 step = getDouble("step"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 log.debug("step: '" + step + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 return step; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 public Long getStart() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 if (start == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
114 start = getLong("start"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
115 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
116 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
117 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
118 log.debug("start: '" + start + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
119 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
120 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
121 return start; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
122 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
123 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
124 public Long getEnd() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
125 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
126 if (end == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
127 end = getLong("end"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
128 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
129 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 log.debug("end: '" + end + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
132 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
133 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
134 return end; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 public Integer getQSectorStart() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
138 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
139 if (qSectorStart == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
140 qSectorStart = getInteger("q1"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
141 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
142 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
143 return qSectorStart; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
144 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
145 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
146 public Integer getQSectorEnd() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
147 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
148 if (qSectorEnd == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
149 qSectorEnd = getInteger("q2"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
150 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
151 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 return qSectorEnd; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
153 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
154 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
155 public int [] getEvents() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
156 if (events == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
157 events = getIntArray("events"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
158 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
159 return events; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
160 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
161 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
162 public DateRange getReferencePeriod() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
163 if (referencePeriod == null) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
164 StateData refStart = artifact.getData("ref_start"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
165 StateData refEnd = artifact.getData("ref_end"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
166 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
167 if (refStart == null || refEnd == null) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
168 log.warn("missing 'ref_start' or 'ref_start' value"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
169 return null; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
171 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
172 try { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
173 long rs = Long.parseLong((String)refStart.getValue()); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
174 long re = Long.parseLong((String)refEnd .getValue()); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
175 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
176 if (rs > re) { long t = rs; rs = re; re = t; } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
177 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
178 Date from = new Date(rs); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
179 Date to = new Date(re); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
180 referencePeriod = new DateRange(from, to); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
181 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
182 catch (NumberFormatException nfe) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
183 log.warn("ref_start or ref_end is not an integer."); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
184 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
185 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
186 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
187 return referencePeriod; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
188 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
189 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
190 public DateRange [] getAnalysisPeriods() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
191 if (analysisPeriods == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
192 analysisPeriods = getDateRange("ana_date"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
193 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
194 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
195 return analysisPeriods; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
196 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
197 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
198 public Boolean getPreprocessing() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
199 if (preprocessing == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
200 preprocessing = getBoolean("preprocessing"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
201 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
202 return preprocessing; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
203 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
204 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
205 public String getFunction() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
206 if (function == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
207 function = getString("function"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
208 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
209 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
210 log.debug("function: " + function); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
211 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
212 return function; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
213 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
214 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
215 public double [] getQs() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
216 if (qs == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
217 qs = getDoubleArray("qs"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
218 } |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
219 |
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
220 if (log.isDebugEnabled() && qs != null) { |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
221 log.debug("qs: " + Arrays.toString(qs)); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
222 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
223 return qs; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
224 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
225 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
226 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |