Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixAccess.java @ 4869:d5f5bdaca316
DatacageWindow: Doc.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 28 Jan 2013 00:46:19 +0100 |
parents | acfd48384835 |
children | a929d9a9fa1e |
rev | line source |
---|---|
3418
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.access; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
4866
acfd48384835
Changed data field names in fix analsis to ld_from, ld_to, ld step.
Raimund Renkert <rrenkert@intevation.de>
parents:
3777
diff
changeset
|
3 import de.intevation.artifacts.CallContext; |
3418
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 import de.intevation.flys.artifacts.FLYSArtifact; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 import java.util.Arrays; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 import org.apache.log4j.Logger; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 public class FixAccess |
4866
acfd48384835
Changed data field names in fix analsis to ld_from, ld_to, ld step.
Raimund Renkert <rrenkert@intevation.de>
parents:
3777
diff
changeset
|
11 extends RangeAccess |
3418
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 private static Logger log = Logger.getLogger(FixAccess.class); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 protected Long start; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 protected Long end; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 protected Integer qSectorStart; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 protected Integer qSectorEnd; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 protected int [] events; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 protected Boolean preprocessing; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 protected String function; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 |
4866
acfd48384835
Changed data field names in fix analsis to ld_from, ld_to, ld step.
Raimund Renkert <rrenkert@intevation.de>
parents:
3777
diff
changeset
|
27 public FixAccess(FLYSArtifact artifact, CallContext context) { |
acfd48384835
Changed data field names in fix analsis to ld_from, ld_to, ld step.
Raimund Renkert <rrenkert@intevation.de>
parents:
3777
diff
changeset
|
28 super(artifact, context); |
3418
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 public Long getStart() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 if (start == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 start = getLong("start"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 if (log.isDebugEnabled()) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 log.debug("start: '" + start + "'"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 return start; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 public Long getEnd() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 if (end == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 end = getLong("end"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
49 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 if (log.isDebugEnabled()) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 log.debug("end: '" + end + "'"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 return end; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 public Integer getQSectorStart() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 if (qSectorStart == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 qSectorStart = getInteger("q1"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 if (log.isDebugEnabled()) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 log.debug("q1: '" + qSectorStart + "'"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 return qSectorStart; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 public Integer getQSectorEnd() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 if (qSectorEnd == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 qSectorEnd = getInteger("q2"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
74 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 if (log.isDebugEnabled()) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 log.debug("q2: '" + qSectorEnd + "'"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 return qSectorEnd; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 public int [] getEvents() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 if (events == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 events = getIntArray("events"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 if (log.isDebugEnabled() && events != null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 log.debug("events: " + Arrays.toString(events)); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 return events; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 public Boolean getPreprocessing() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 if (preprocessing == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 preprocessing = getBoolean("preprocessing"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 if (log.isDebugEnabled()) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 log.debug("preprocessing: " + preprocessing); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 return preprocessing; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 public String getFunction() { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 if (function == null) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 function = getString("function"); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 if (log.isDebugEnabled()) { |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 log.debug("function: " + function); |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 return function; |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 } |
21c1d1d25919
FixA: Moved common parameter access to common base class.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |