# HG changeset patch # User "Tom Gottfried " # Date 1411058474 -7200 # Node ID df5838cc7eccd9f0668918400a3b2c2dd78972a7 # Parent 9ab967eb2c51e8c2859b5d1db0f8cf2fd9455216 These meta-lines had been invented before. diff -r 9ab967eb2c51 -r df5838cc7ecc artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java Thu Sep 18 18:16:51 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/MiddleBedHeightExporter.java Thu Sep 18 18:41:14 2014 +0200 @@ -188,30 +188,26 @@ private void writeMetaData(CSVWriter writer, MiddleBedHeightData data) { - writer.writeNext(new String[]{"#"}); String year = ""; if (data.getYear() != 0) { year = String.valueOf(data.getYear()); } - writer.writeNext(new String[]{"# " + msg(CSV_META_YEAR) + - ": " + year}); - writer.writeNext(new String[]{"# " + msg(CSV_META_TYPE) + - ": " + data.getType()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_LOC_SYSTEM) + - ": " + data.getLocationSystem()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_CUR_ELEV_MODEL) + - ": " + data.getCurElevationModel()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_OLD_ELEV_MODEL) + - ": " + data.getOldElevationModel()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_RIVER_ELEV_MODEL) + - ": " + data.getRiverElevationModel()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_SOUNDING_WIDTH) + - ": " + data.getSoundingWidth()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_RANGE) + - ": " + data.getStations().min() + " - " + data.getStations().max()}); - writer.writeNext(new String[]{"# " + msg(CSV_META_EVAL_BY) + - ": " + data.getEvaluatedBy()}); - writer.writeNext(new String[]{"#"}); + writeCSVInfo(writer, new String[] { + "", // blank meta-line to separate datasets in CSV + msg(CSV_META_YEAR) + ": " + year, + msg(CSV_META_TYPE) + ": " + data.getType(), + msg(CSV_META_LOC_SYSTEM) + ": " + data.getLocationSystem(), + msg(CSV_META_CUR_ELEV_MODEL) + ": " + + data.getCurElevationModel(), + msg(CSV_META_OLD_ELEV_MODEL) + ": " + + data.getOldElevationModel(), + msg(CSV_META_RIVER_ELEV_MODEL) + ": " + + data.getRiverElevationModel(), + msg(CSV_META_SOUNDING_WIDTH) + ": " + data.getSoundingWidth(), + msg(CSV_META_RANGE) + ": " + data.getStations().min() + + " - " + data.getStations().max(), + msg(CSV_META_EVAL_BY) + ": " + data.getEvaluatedBy() + }); } @Override