changeset 8011:60cd665b1bd6 facet-metadata

Write an empty string if year is 0 in middle bedheight exporter.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 03 Jul 2014 17:20:37 +0200
parents b8d1bd49c637
children 8922eda935eb
files artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java	Thu Jul 03 17:17:28 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java	Thu Jul 03 17:20:37 2014 +0200
@@ -207,8 +207,12 @@
 
     private void writeMetaData(CSVWriter writer, MiddleBedHeightData data) {
          writer.writeNext(new String[]{"#"});
+         String year = "";
+         if (data.getStartYear() != 0) {
+             year = String.valueOf(data.getStartYear());
+         }
          writer.writeNext(new String[]{"# " + msg(CSV_META_YEAR) +
-             ": " + data.getStartYear()});
+             ": " + year});
          writer.writeNext(new String[]{"# " + msg(CSV_META_TYPE) +
              ": " + data.getType()});
          writer.writeNext(new String[]{"# " + msg(CSV_META_LOC_SYSTEM) +

http://dive4elements.wald.intevation.org