changeset 9285:9b16f58c62a7

Small cleanup/renames
author mschaefer
date Mon, 23 Jul 2018 19:18:11 +0200
parents 486b6160962f
children bcbae86ce7b3
files artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeDurationValuesFinder.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java
diffstat 4 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeDurationValuesFinder.java	Fri Jul 20 16:03:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeDurationValuesFinder.java	Mon Jul 23 19:18:11 2018 +0200
@@ -44,7 +44,6 @@
 
     private DoubleRange durRange;
 
-    private final String approxPrefix = "\u2248";// "ca.";
 
     /***** CONSTRUCTORS *****/
 
@@ -91,6 +90,7 @@
         }
     }
 
+
     /***** METHODS *****/
 
     /**
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java	Fri Jul 20 16:03:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java	Mon Jul 23 19:18:11 2018 +0200
@@ -56,7 +56,7 @@
 
     private static final long serialVersionUID = 1L;
 
-    private final String[] mainvalueLabels;
+    private final String[] waterlevelLabels;
 
     // private final WstInfo wstInfo;
 
@@ -72,7 +72,7 @@
 
     public FloodDurationCalculationResult(final String label, final String[] mainvalueLabels, final Collection<ResultRow> rows) {
         super(label, rows);
-        this.mainvalueLabels = mainvalueLabels;
+        this.waterlevelLabels = mainvalueLabels;
     }
 
     /**
@@ -94,12 +94,12 @@
 
     @Override
     protected void writeCSVResultMetadata(final ExportContextCSV exportContextCSV) {
-        if (this.mainvalueLabels.length >= 1) {
+        if (this.waterlevelLabels.length >= 1) {
             // "##METADATEN WASSERSPIEGELLAGE"
             exportContextCSV.writeCSVMetaEntry(SInfoI18NStrings.CSV_META_HEADER_WATERLEVEL);
             for (int i = 1; i <= getWaterlevelCount(); i++) {
                 // "# Bezeichnung der Wasserspiegellage: "
-                final String label = this.getMainValueLabel(i - 1);
+                final String label = this.getWaterlevelLabel(i - 1);
                 exportContextCSV.writeCSVMetaEntry(SInfoI18NStrings.CSV_META_HEADER_WATERLEVEL_NAME, String.format("%d: %s", i, label));
             }
             // "# Bezugspegel: "
@@ -232,12 +232,12 @@
     }
 
     public final int getWaterlevelCount() {
-        return (this.mainvalueLabels != null) ? this.mainvalueLabels.length : 0;
+        return (this.waterlevelLabels != null) ? this.waterlevelLabels.length : 0;
     }
 
-    public String getMainValueLabel(final int j) {
-        if (this.mainvalueLabels != null && j < this.mainvalueLabels.length)
-            return this.mainvalueLabels[j];
+    public String getWaterlevelLabel(final int j) {
+        if (this.waterlevelLabels != null && j < this.waterlevelLabels.length)
+            return this.waterlevelLabels[j];
         return "";
     }
 
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java	Fri Jul 20 16:03:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java	Mon Jul 23 19:18:11 2018 +0200
@@ -78,7 +78,7 @@
             final int facetIndex, final int resultIndex, final int dataIndex) {
 
         final String description = Resources.getMsg(context.getMeta(), FACET_MAIN_VALUE_DURATION_DESCRIPTION, FACET_MAIN_VALUE_DURATION_DESCRIPTION,
-                result.getMainValueLabel(dataIndex));
+                result.getWaterlevelLabel(dataIndex));
 
         return new FloodDurationFacet(facetIndex, resultIndex, dataIndex, FACET_MAIN_VALUE_DURATION, description, ComputeType.ADVANCE, I18N_AXIS_LABEL, hash,
                 id);
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java	Fri Jul 20 16:03:40 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java	Mon Jul 23 19:18:11 2018 +0200
@@ -78,7 +78,7 @@
     public static Facet createMainValueHeightFacet(final CallContext context, final String hash, final String id, final FloodDurationCalculationResult result,
             final int facetIndex, final int resultIndex, final int dataIndex) {
         final String description = Resources.getMsg(context.getMeta(), FACET_MAIN_VALUE_HEIGHT_DESCRIPTION, FACET_MAIN_VALUE_HEIGHT_DESCRIPTION,
-                result.getMainValueLabel(dataIndex));
+                result.getWaterlevelLabel(dataIndex));
 
         return new FloodDurationFacet(facetIndex, resultIndex, dataIndex, FACET_MAIN_VALUE_HEIGHT, description, ComputeType.ADVANCE, I18N_AXIS_LABEL, hash, id);
     }

http://dive4elements.wald.intevation.org