# HG changeset patch # User Sascha L. Teichmann # Date 1401811027 -7200 # Node ID 8a2ce10da352f0878a993a2ec4d2e6ea787b31ab # Parent df9ac27d6b74e5bc755a003e2c1702a7d71cc470 Feed unit to PDF template. diff -r df9ac27d6b74 -r 8a2ce10da352 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/BedDifferenceJRDataSource.java --- 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 data; private HashMap 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]; }