Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java @ 9535:3fa8551c3d1b
Fixed error in bundu bzws missing volume calculation for mean bed height;
added various additional output columns (field bed height, field flow depth etc.)
author | mschaefer |
---|---|
date | Fri, 12 Oct 2018 18:49:38 +0200 |
parents | 7228bd10a8cc |
children | b9c87bbff6a4 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java Thu Oct 11 18:39:21 2018 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/BunduResultType.java Fri Oct 12 18:49:38 2018 +0200 @@ -14,6 +14,7 @@ import org.dive4elements.artifacts.CallContext; import org.dive4elements.river.artifacts.common.AbstractResultType; import org.dive4elements.river.artifacts.common.I18NStrings; +import org.dive4elements.river.artifacts.sinfo.common.SInfoResultType; import org.dive4elements.river.utils.Formatter; /** @@ -240,6 +241,36 @@ } }; + public static final SInfoResultType heightMeanBed = new SInfoResultType(null, "bundu.export.bezugswst.csv.meta.miss.height.mean_bed") { + 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.getMeanBedHeight(context); + } + }; + + public static final SInfoResultType flowdepthMeanBed = new SInfoResultType(I18NStrings.UNIT_M, "bundu.export.bezugswst.csv.meta.miss.flowdepth.mean_bed") { + 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.getFlowDepth(context); + } + }; + public static final BunduResultType missDepthMeanBed = new BunduResultType(I18NStrings.UNIT_NONE, null) { private static final long serialVersionUID = 1L; @@ -319,7 +350,7 @@ @Override protected NumberFormat createFormatter(final CallContext context) { - throw new UnsupportedOperationException(); + return Formatter.getMeanBedHeight(context); } }; @@ -338,7 +369,7 @@ @Override protected NumberFormat createFormatter(final CallContext context) { - throw new UnsupportedOperationException(); + return Formatter.getFlowDepth(context); } };