Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java @ 3207:babb0798d548
Removed dead code.
flys-artifacts/trunk@4826 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 28 Jun 2012 14:50:14 +0000 |
parents | e11dbf8baf69 |
children | 90c4ce100ce1 |
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 de.intevation.flys.utils.FLYSUtils; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 import gnu.trove.TDoubleArrayList; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 import java.util.ArrayList; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 import java.util.Arrays; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 import java.util.Date; |
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 import org.apache.log4j.Logger; |
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 public class FixationArtifactAccess |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
20 extends Access |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 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
|
23 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 protected String river; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 protected String calculationMode; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 protected Double from; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 protected Double to; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 protected Double step; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 protected Long start; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 protected Long end; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 protected Integer qSectorStart; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 protected Integer qSectorEnd; |
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 DateRange referencePeriod; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 protected DateRange [] analysisPeriods; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 protected int [] events; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 protected Boolean preprocessing; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 protected String function; |
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 protected double [] qs; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
49 public FixationArtifactAccess() { |
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 public FixationArtifactAccess(FLYSArtifact artifact) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
53 super(artifact); |
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 public String getRiver() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 if (river == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
58 river = getString("river"); |
3203
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 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 log.debug("river: '" + river + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 return river; |
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 public String getCalculationMode() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 if (calculationMode == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
68 calculationMode = getString("calculation.mode"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 } |
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 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 log.debug("calculationMode: '" + calculationMode + "'"); |
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 return calculationMode; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 } |
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 public Double getFrom() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 if (from == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
80 from = getDouble("from"); |
3203
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 log.debug("from: '" + from + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 } |
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 return from; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 } |
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 public Double getTo() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 if (to == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
93 to = getDouble("to"); |
3203
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 log.debug("to: '" + to + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 } |
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 return to; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 } |
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 public Double getStep() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 if (step == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
106 step = getDouble("step"); |
3203
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 log.debug("step: '" + step + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 } |
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 return step; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 } |
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 public Long getStart() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
117 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
118 if (start == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
119 start = getLong("start"); |
3203
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
122 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
123 log.debug("start: '" + start + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
124 } |
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 return start; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
127 } |
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 public Long getEnd() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
130 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
131 if (end == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
132 end = getLong("end"); |
3203
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
135 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
136 log.debug("end: '" + end + "'"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
137 } |
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 return end; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
140 } |
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 public Integer getQSectorStart() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
143 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
144 if (qSectorStart == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
145 qSectorStart = getInteger("q1"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
146 } |
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 return qSectorStart; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
149 } |
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 public Integer getQSectorEnd() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
152 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
153 if (qSectorEnd == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
154 qSectorEnd = getInteger("q2"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
155 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
156 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
157 return qSectorEnd; |
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
160 public int [] getEvents() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
161 if (events == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
162 events = getIntArray("events"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
163 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
164 return events; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
165 } |
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 public DateRange getReferencePeriod() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
168 if (referencePeriod == null) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
169 StateData refStart = artifact.getData("ref_start"); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
170 StateData refEnd = artifact.getData("ref_end"); |
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 if (refStart == null || refEnd == null) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
173 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
|
174 return null; |
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
177 try { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
178 long rs = Long.parseLong((String)refStart.getValue()); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
179 long re = Long.parseLong((String)refEnd .getValue()); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
180 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
181 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
|
182 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
183 Date from = new Date(rs); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
184 Date to = new Date(re); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
185 referencePeriod = new DateRange(from, to); |
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 catch (NumberFormatException nfe) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
188 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
|
189 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
190 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
191 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
192 return referencePeriod; |
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 public DateRange [] getAnalysisPeriods() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
196 if (analysisPeriods == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
197 analysisPeriods = getDateRange("ana_date"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
198 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
199 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
200 return analysisPeriods; |
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
203 public Boolean getPreprocessing() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
204 if (preprocessing == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
205 preprocessing = getBoolean("preprocessing"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
206 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
207 return preprocessing; |
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 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
210 public String getFunction() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
211 if (function == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
212 function = getString("function"); |
3203
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 if (log.isDebugEnabled()) { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
215 log.debug("function: " + function); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
216 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
217 return function; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
218 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
219 |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
220 public double [] getQs() { |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
221 if (qs == null) { |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
222 qs = getDoubleArray("qs"); |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
223 } |
3207
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
224 |
babb0798d548
Removed dead code.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3206
diff
changeset
|
225 if (log.isDebugEnabled() && qs != null) { |
3203
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
226 log.debug("qs: " + Arrays.toString(qs)); |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
227 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
228 return qs; |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
229 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
230 } |
1b9f791937c3
Moved FixationArtifactAccess to new access package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
231 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |