Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/MeasurementState.java @ 803:feae2f9d6c6f
Removed trailing whitespace.
gnv-artifacts/trunk@885 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 07 Apr 2010 07:52:27 +0000 |
parents | a5526908f92f |
children | 22c18083225e |
comparison
equal
deleted
inserted
replaced
802:4abe172be970 | 803:feae2f9d6c6f |
---|---|
37 * This state handles input of measurements relating to a parameter. The user | 37 * This state handles input of measurements relating to a parameter. The user |
38 * interface description created by this class represents a matrix - each | 38 * interface description created by this class represents a matrix - each |
39 * parameter in a single row, each measurement in a column. An invalid | 39 * parameter in a single row, each measurement in a column. An invalid |
40 * measurement column for a specific parameter is marked as disabled and should | 40 * measurement column for a specific parameter is marked as disabled and should |
41 * not be selected. | 41 * not be selected. |
42 * | 42 * |
43 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 43 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
44 */ | 44 */ |
45 public class MeasurementState | 45 public class MeasurementState |
46 extends DefaultState | 46 extends DefaultState |
47 { | 47 { |
94 initMeasurements(data); | 94 initMeasurements(data); |
95 } | 95 } |
96 | 96 |
97 /** | 97 /** |
98 * Initialize the measurements used in this matrix. | 98 * Initialize the measurements used in this matrix. |
99 * | 99 * |
100 * @param data The measurements. | 100 * @param data The measurements. |
101 */ | 101 */ |
102 private void initMeasurements(Collection data) { | 102 private void initMeasurements(Collection data) { |
103 Iterator iter = data.iterator(); | 103 Iterator iter = data.iterator(); |
104 while (iter.hasNext()) { | 104 while (iter.hasNext()) { |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 /** | 136 /** |
137 * Initialize the parameters used in this matrix. | 137 * Initialize the parameters used in this matrix. |
138 * | 138 * |
139 * @param parameter Parameters. | 139 * @param parameter Parameters. |
140 */ | 140 */ |
141 private void initParameters(String[] parameter) { | 141 private void initParameters(String[] parameter) { |
142 for (String param: parameter) { | 142 for (String param: parameter) { |
143 parameters.add(param); | 143 parameters.add(param); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 /** | 147 /** |
148 * Returns the number of measurements. | 148 * Returns the number of measurements. |
149 * | 149 * |
150 * @return the number of measurements. | 150 * @return the number of measurements. |
151 */ | 151 */ |
152 public int measurementSize() { | 152 public int measurementSize() { |
153 if (measurements != null) | 153 if (measurements != null) |
154 return measurements.size(); | 154 return measurements.size(); |
156 return 0; | 156 return 0; |
157 } | 157 } |
158 | 158 |
159 /** | 159 /** |
160 * Returns the number of parameters. | 160 * Returns the number of parameters. |
161 * | 161 * |
162 * @return number of parameters. | 162 * @return number of parameters. |
163 */ | 163 */ |
164 public int parameterSize() { | 164 public int parameterSize() { |
165 if (parameters != null) | 165 if (parameters != null) |
166 return parameters.size(); | 166 return parameters.size(); |
168 return 0; | 168 return 0; |
169 } | 169 } |
170 | 170 |
171 /** | 171 /** |
172 * Returns the measurement at idx. | 172 * Returns the measurement at idx. |
173 * | 173 * |
174 * @param idx Index. | 174 * @param idx Index. |
175 * @return the measurement. | 175 * @return the measurement. |
176 */ | 176 */ |
177 public String getMeasurement(int idx) { | 177 public String getMeasurement(int idx) { |
178 if (idx >= 0 && idx < measurements.size()) | 178 if (idx >= 0 && idx < measurements.size()) |
182 return ""; | 182 return ""; |
183 } | 183 } |
184 | 184 |
185 /** | 185 /** |
186 * Returns the parameter at idx. | 186 * Returns the parameter at idx. |
187 * | 187 * |
188 * @param idx Index | 188 * @param idx Index |
189 * @return the parameter. | 189 * @return the parameter. |
190 */ | 190 */ |
191 public String getParameter(int idx) { | 191 public String getParameter(int idx) { |
192 if (idx >= 0 && idx < parameters.size()) { | 192 if (idx >= 0 && idx < parameters.size()) { |
212 } | 212 } |
213 | 213 |
214 /** | 214 /** |
215 * This method returns true, if a measurement is valid for a specific | 215 * This method returns true, if a measurement is valid for a specific |
216 * parameter - otherwise false. | 216 * parameter - otherwise false. |
217 * | 217 * |
218 * @param i Index of a measurement column. | 218 * @param i Index of a measurement column. |
219 * @param j Index of a parameter row. | 219 * @param j Index of a parameter row. |
220 * @return true, if valid, else false. | 220 * @return true, if valid, else false. |
221 */ | 221 */ |
222 public boolean isValid(int i, int j) { | 222 public boolean isValid(int i, int j) { |
276 | 276 |
277 /** | 277 /** |
278 * This method create the user interface description for measurement and | 278 * This method create the user interface description for measurement and |
279 * parameters as matrix. A row for each parameter, a column for each | 279 * parameters as matrix. A row for each parameter, a column for each |
280 * measurement. | 280 * measurement. |
281 * | 281 * |
282 * @param artCreator | 282 * @param artCreator |
283 * @param creator | 283 * @param creator |
284 * @param document | 284 * @param document |
285 * @param dynamicNode | 285 * @param dynamicNode |
286 * @param callMeta | 286 * @param callMeta |
354 | 354 |
355 /** | 355 /** |
356 * This feed takes some input data storing measurement ids and parameter ids | 356 * This feed takes some input data storing measurement ids and parameter ids |
357 * and put them into ExtendedInputData objects to save the relation between | 357 * and put them into ExtendedInputData objects to save the relation between |
358 * a measurement and the parameter it belongs to. | 358 * a measurement and the parameter it belongs to. |
359 * | 359 * |
360 * @param context | 360 * @param context |
361 * @param input | 361 * @param input |
362 * @param uuid | 362 * @param uuid |
363 * @return | 363 * @return |
364 * @throws StateException | 364 * @throws StateException |