Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/LongitudinalSectionGenerator.java @ 1861:11c4b1429117
Cosmetics, resolve code duplicate.
flys-artifacts/trunk@3210 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 10 Nov 2011 10:18:31 +0000 |
parents | a97764363ba2 |
children | 7c52e9cb2a72 |
comparison
equal
deleted
inserted
replaced
1860:ddd425858169 | 1861:11c4b1429117 |
---|---|
275 } | 275 } |
276 else if (name.equals(LONGITUDINAL_Q)) { | 276 else if (name.equals(LONGITUDINAL_Q)) { |
277 doQOut((WQKms) f.getData(artifact, context), facet, attr, visible); | 277 doQOut((WQKms) f.getData(artifact, context), facet, attr, visible); |
278 } | 278 } |
279 else if (name.equals(LONGITUDINAL_ANNOTATION)) { | 279 else if (name.equals(LONGITUDINAL_ANNOTATION)) { |
280 doAnnotationsOut(f.getData(artifact, context), facet, attr, visible); | 280 doAnnotations((FLYSAnnotation) f.getData(artifact, context), |
281 } | 281 facet, attr, visible); |
282 else if (name.equals(STATIC_WKMS) || name.equals(HEIGHTMARKS_POINTS)) { | 282 } |
283 else if (name.equals(STATIC_WKMS) | |
284 || name.equals(HEIGHTMARKS_POINTS) | |
285 || name.equals(STATIC_WQKMS)) { | |
283 doWOut((WKms) f.getData(artifact, context), facet, attr, visible); | 286 doWOut((WKms) f.getData(artifact, context), facet, attr, visible); |
284 } | 287 } |
285 else if (name.equals(W_DIFFERENCES)) { | 288 else if (name.equals(W_DIFFERENCES)) { |
286 doWDifferencesOut( | 289 doWDifferencesOut( |
287 (WKms) f.getData(artifact, context), | 290 (WKms) f.getData(artifact, context), |
291 } | 294 } |
292 else { | 295 else { |
293 logger.warn("Unknown facet name: " + name); | 296 logger.warn("Unknown facet name: " + name); |
294 return; | 297 return; |
295 } | 298 } |
296 } | |
297 | |
298 | |
299 /** | |
300 * Register annotations available for the diagram. | |
301 * | |
302 * @param o list of annotations (data of facet). | |
303 * @param facet The facet. This facet does NOT support any data objects. Use | |
304 * FLYSArtifact.getNativeFacet() instead to retrieve a Facet which supports | |
305 * data. | |
306 * @param theme yet ignored. | |
307 * @param visible The visibility of the annotations. | |
308 */ | |
309 protected void doAnnotationsOut( | |
310 Object o, | |
311 Facet facet, | |
312 Document theme, | |
313 boolean visible | |
314 ) { | |
315 logger.debug("LongitudinalSectionGenerator.doAnnotationsOut"); | |
316 | |
317 // Add all annotations in list o to our annotation pool. | |
318 // TODO Duplicate in ComputedDischartgeCurveGenerator, merge | |
319 FLYSAnnotation fa = (FLYSAnnotation) o; | |
320 fa.setTheme(theme); | |
321 fa.setLabel(facet.getDescription()); | |
322 addAnnotations(fa, visible); | |
323 } | 299 } |
324 | 300 |
325 | 301 |
326 /** | 302 /** |
327 * Process the output for W facets in a longitudinal section curve. | 303 * Process the output for W facets in a longitudinal section curve. |