diff artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java @ 9480:7228bd10a8cc

Fixed bundu bzws bedheightfinder todos, added types for excavation volume and costs total
author mschaefer
date Mon, 10 Sep 2018 17:06:23 +0200
parents 9e471031cc1e
children 3fa8551c3d1b
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java	Mon Sep 10 15:31:55 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java	Mon Sep 10 17:06:23 2018 +0200
@@ -112,6 +112,8 @@
             throw new UnsupportedOperationException();
         }
     };
+
+    // TODO missVolumeTotal und missMassTotal differenzieren in Gesamtsumme und Feld1-10-Summe
     public static final BunduResultType missVolumeTotal = new BunduResultType(I18NStrings.UNIT_CUBIC_M, "bundu.export.bezugswst.csv.meta.miss.volume.total") {
         private static final long serialVersionUID = 1L;
 
@@ -174,6 +176,38 @@
         }
     };
 
+    public static final BunduResultType excavationVolumeTotal = new BunduResultType(I18NStrings.UNIT_CUBIC_M,
+            "bundu.export.bezugswst.csv.meta.miss.excavationtotal", "bundu.export.bezugswst.pdf.meta.miss.excavationtotal") {
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        public String exportValue(final CallContext context, final Object value) {
+            final double doubleValue = asDouble(value);
+            return exportDoubleValue(context, doubleValue);
+        }
+
+        @Override
+        protected NumberFormat createFormatter(final CallContext context) {
+            return Formatter.getIntegerFormatter(context);
+        }
+    };
+
+    public static final BunduResultType excavationCostsTotal = new BunduResultType(I18NStrings.UNIT_EURO, "bundu.export.bezugswst.csv.meta.miss.coststotal",
+            "bundu.export.bezugswst.pdf.meta.miss.coststotal") {
+        private static final long serialVersionUID = 1L;
+
+        @Override
+        public String exportValue(final CallContext context, final Object value) {
+            final double doubleValue = asDouble(value);
+            return exportDoubleValue(context, doubleValue);
+        }
+
+        @Override
+        protected NumberFormat createFormatter(final CallContext context) {
+            return Formatter.getCurrencyFormat(context);
+        }
+    };
+
     public static final BunduResultType channelWidth = new BunduResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.channel.width",
             "bundu.export.bezugswst.pdf.meta.miss.channel.width") {
         private static final long serialVersionUID = 1L;

http://dive4elements.wald.intevation.org