changeset 7909:8a2ce10da352

Feed unit to PDF template.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 03 Jun 2014 17:57:07 +0200
parents df9ac27d6b74
children 432addd00687
files artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java	Tue Jun 03 15:42:49 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java	Tue Jun 03 17:57:07 2014 +0200
@@ -11,8 +11,6 @@
 import java.util.ArrayList;
 import java.util.HashMap;
 
-import org.apache.log4j.Logger;
-
 import net.sf.jasperreports.engine.JRDataSource;
 import net.sf.jasperreports.engine.JRException;
 import net.sf.jasperreports.engine.JRField;
@@ -23,9 +21,6 @@
  */
 public class BedDifferenceJRDataSource implements JRDataSource
 {
-    /** The logger used in this exporter.*/
-    private static Logger logger = Logger.getLogger(BedDifferenceJRDataSource.class);
-
     private ArrayList<String[]> data;
     private HashMap<String, String> metaData;
 
@@ -67,6 +62,9 @@
         else if ("differences".equals(fieldName)) {
             value = metaData.get("differences");
         }
+        else if ("unit".equals(fieldName)) {
+            value = metaData.get("unit");
+        }
         else if ("km".equals(fieldName)) {
             value = data.get(index)[0];
         }

http://dive4elements.wald.intevation.org