comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixAccess.java @ 3418:21c1d1d25919

FixA: Moved common parameter access to common base class. flys-artifacts/trunk@5071 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 19 Jul 2012 15:44:14 +0000
parents
children da7cf0e3ccaa
comparison
equal deleted inserted replaced
3417:ed9689fbcd26 3418:21c1d1d25919
1 package de.intevation.flys.artifacts.access;
2
3 import de.intevation.flys.artifacts.FLYSArtifact;
4
5 import java.util.Arrays;
6
7 import org.apache.log4j.Logger;
8
9 public class FixAccess
10 extends Access
11 {
12 private static Logger log = Logger.getLogger(FixAccess.class);
13
14 protected String river;
15
16 protected Double from;
17 protected Double to;
18 protected Double step;
19
20 protected Long start;
21 protected Long end;
22
23 protected Integer qSectorStart;
24 protected Integer qSectorEnd;
25
26 protected int [] events;
27
28 protected Boolean preprocessing;
29
30 protected String function;
31
32 public FixAccess() {
33 }
34
35 public FixAccess(FLYSArtifact artifact) {
36 super(artifact);
37 }
38
39 public String getRiver() {
40 if (river == null) {
41 river = getString("river");
42 }
43 if (log.isDebugEnabled()) {
44 log.debug("river: '" + river + "'");
45 }
46 return river;
47 }
48
49 public Double getFrom() {
50
51 if (from == null) {
52 from = getDouble("from");
53 }
54
55 if (log.isDebugEnabled()) {
56 log.debug("from: '" + from + "'");
57 }
58
59 return from;
60 }
61
62 public Double getTo() {
63
64 if (to == null) {
65 to = getDouble("to");
66 }
67
68 if (log.isDebugEnabled()) {
69 log.debug("to: '" + to + "'");
70 }
71
72 return to;
73 }
74
75 public Double getStep() {
76
77 if (step == null) {
78 step = getDouble("step");
79 }
80
81 if (log.isDebugEnabled()) {
82 log.debug("step: '" + step + "'");
83 }
84
85 return step;
86 }
87
88 public Long getStart() {
89
90 if (start == null) {
91 start = getLong("start");
92 }
93
94 if (log.isDebugEnabled()) {
95 log.debug("start: '" + start + "'");
96 }
97
98 return start;
99 }
100
101 public Long getEnd() {
102
103 if (end == null) {
104 end = getLong("end");
105 }
106
107 if (log.isDebugEnabled()) {
108 log.debug("end: '" + end + "'");
109 }
110
111 return end;
112 }
113
114 public Integer getQSectorStart() {
115
116 if (qSectorStart == null) {
117 qSectorStart = getInteger("q1");
118 }
119
120 if (log.isDebugEnabled()) {
121 log.debug("q1: '" + qSectorStart + "'");
122 }
123
124 return qSectorStart;
125 }
126
127 public Integer getQSectorEnd() {
128
129 if (qSectorEnd == null) {
130 qSectorEnd = getInteger("q2");
131 }
132
133 if (log.isDebugEnabled()) {
134 log.debug("q2: '" + qSectorEnd + "'");
135 }
136
137 return qSectorEnd;
138 }
139
140 public int [] getEvents() {
141 if (events == null) {
142 events = getIntArray("events");
143 }
144 if (log.isDebugEnabled() && events != null) {
145 log.debug("events: " + Arrays.toString(events));
146 }
147 return events;
148 }
149
150 public Boolean getPreprocessing() {
151 if (preprocessing == null) {
152 preprocessing = getBoolean("preprocessing");
153 }
154 if (log.isDebugEnabled()) {
155 log.debug("preprocessing: " + preprocessing);
156 }
157 return preprocessing;
158 }
159
160 public String getFunction() {
161 if (function == null) {
162 function = getString("function");
163 }
164 if (log.isDebugEnabled()) {
165 log.debug("function: " + function);
166 }
167 return function;
168 }
169
170
171 }
172 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org