comparison artifacts/src/main/java/org/dive4elements/river/exports/WaterlevelExporter.java @ 6634:b1e66ea7fc2b

Fix Waterlevel description for issue1404 There might be a case for the wq_single description instead of getValueFromWQ but this works for a single W value and multiple W values and was the code formerly used for PDF export.
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 22 Jul 2013 17:40:41 +0200
parents 8d88db1f5d36
children d322da01d862
comparison
equal deleted inserted replaced
6627:0e1f142af397 6634:b1e66ea7fc2b
635 if (wqkms != null && wqkms.getRawValue() != null) { 635 if (wqkms != null && wqkms.getRawValue() != null) {
636 WINFOArtifact winfo = (WINFOArtifact) flys; 636 WINFOArtifact winfo = (WINFOArtifact) flys;
637 colDesc = RiverUtils.getNamedMainValue(winfo, wqkms.getRawValue()); 637 colDesc = RiverUtils.getNamedMainValue(winfo, wqkms.getRawValue());
638 // For 'W am Pegel' s 638 // For 'W am Pegel' s
639 if (colDesc == null) { 639 if (colDesc == null) {
640 colDesc = ((D4EArtifact)master).getDataAsString("wq_single"); 640 Double value = RiverUtils.getValueFromWQ(wqkms);
641 colDesc = (value != null) ?
642 Formatter.getWaterlevelW(context).format(value) : null;
641 } 643 }
642 } 644 }
643 } 645 }
644 if (colDesc != null) { 646 if (colDesc != null) {
645 /* Quick hack. Can be removed when database strings are 647 /* Quick hack. Can be removed when database strings are

http://dive4elements.wald.intevation.org