[PATCH 1 of 2] Small cleanup/renames
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 24 07:32:23 CEST 2018
# HG changeset patch
# User mschaefer
# Date 1532366291 -7200
# Node ID 9b16f58c62a78a496d4d346fc3522d7d0535aaf6
# Parent 486b6160962fae72e3b6a0a2607d5053c12b7551
Small cleanup/renames
diff -r 486b6160962f -r 9b16f58c62a7 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/GaugeDurationValuesFinder.java
--- 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 *****/
/**
diff -r 486b6160962f -r 9b16f58c62a7 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationCalculationResult.java
--- 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 "";
}
diff -r 486b6160962f -r 9b16f58c62a7 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodDurationProcessor.java
--- 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);
diff -r 486b6160962f -r 9b16f58c62a7 artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/FloodHeightProcessor.java
--- 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);
}
More information about the Dive4Elements-commits
mailing list