[PATCH] Amtl. Linien: Added report if an official line was found in report
Wald Commits
scm-commit at wald.intevation.org
Fri Jun 28 14:12:03 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1372421518 -7200
# Node ID 7cb247824ed1bd61b11134e4ab4c1aedbffa38be
# Parent f3b3742fbdad142ffb05eb4f6d9cbd82f7e6a908
Amtl. Linien: Added report if an official line was found in report.
diff -r f3b3742fbdad -r 7cb247824ed1 artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java Fri Jun 28 14:00:15 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/WaterlevelState.java Fri Jun 28 14:11:58 2013 +0200
@@ -17,14 +17,17 @@
import org.dive4elements.river.artifacts.ChartArtifact;
import org.dive4elements.river.artifacts.D4EArtifact;
import org.dive4elements.river.artifacts.WINFOArtifact;
+import org.dive4elements.river.artifacts.model.Calculation;
import org.dive4elements.river.artifacts.model.CalculationResult;
import org.dive4elements.river.artifacts.model.CrossSectionWaterLineFacet;
import org.dive4elements.river.artifacts.model.DataFacet;
import org.dive4elements.river.artifacts.model.EmptyFacet;
import org.dive4elements.river.artifacts.model.FacetTypes;
+import org.dive4elements.river.artifacts.model.OfficialLineFinder;
import org.dive4elements.river.artifacts.model.ReportFacet;
import org.dive4elements.river.artifacts.model.WQKms;
import org.dive4elements.river.artifacts.model.WaterlevelFacet;
+import org.dive4elements.river.artifacts.resources.Resources;
import org.dive4elements.river.utils.RiverUtils;
/** State in which a waterlevel has been calculated. */
@@ -112,7 +115,22 @@
facets.add(pdf);
}
- if (res.getReport().hasProblems()) {
+ Calculation report = res.getReport();
+
+ List<OfficialLineFinder.ValueRange> ols =
+ OfficialLineFinder.findOfficialLines(winfo);
+
+ if (!ols.isEmpty()) {
+ for (OfficialLineFinder.ValueRange ol: ols) {
+ report.addProblem(Resources.format(
+ cc.getMeta(),
+ "official.line.found",
+ "Found official line for {0}.",
+ ol.getName()));
+ }
+ }
+
+ if (report.hasProblems()) {
facets.add(new ReportFacet(ComputeType.ADVANCE, hash, id));
}
diff -r f3b3742fbdad -r 7cb247824ed1 artifacts/src/main/resources/messages.properties
--- a/artifacts/src/main/resources/messages.properties Fri Jun 28 14:00:15 2013 +0200
+++ b/artifacts/src/main/resources/messages.properties Fri Jun 28 14:11:58 2013 +0200
@@ -436,6 +436,8 @@
wsplgen.job.queued = WSPLGEN job in queue.
wsplgen.job.error = An unexpected error while starting WSPLGEN occured.
+official.line.found = Found official line for {0}.
+
wsp.selected.string = {0}
Mosel = Mosel
diff -r f3b3742fbdad -r 7cb247824ed1 artifacts/src/main/resources/messages_de.properties
--- a/artifacts/src/main/resources/messages_de.properties Fri Jun 28 14:00:15 2013 +0200
+++ b/artifacts/src/main/resources/messages_de.properties Fri Jun 28 14:11:58 2013 +0200
@@ -436,6 +436,8 @@
wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
wsplgen.job.error = Ein unerwarteter Fehler beim Starten von WSPLGEN ist aufgetreten.
+official.line.found = Es existiert eine amtliche Festlegung f\u00fcr {0}.
+
wsp.selected.string = {0}
Mosel = Mosel
diff -r f3b3742fbdad -r 7cb247824ed1 artifacts/src/main/resources/messages_de_DE.properties
--- a/artifacts/src/main/resources/messages_de_DE.properties Fri Jun 28 14:00:15 2013 +0200
+++ b/artifacts/src/main/resources/messages_de_DE.properties Fri Jun 28 14:11:58 2013 +0200
@@ -433,6 +433,8 @@
wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
wsplgen.job.error = Ein unerwarteter Fehler beim Starten von WSPLGEN ist aufgetreten.
+official.line.found = Es existiert eine amtliche Festlegung f\u00fcr {0}.
+
wsp.selected.string = {0}
Mosel = Mosel
diff -r f3b3742fbdad -r 7cb247824ed1 artifacts/src/main/resources/messages_en.properties
--- a/artifacts/src/main/resources/messages_en.properties Fri Jun 28 14:00:15 2013 +0200
+++ b/artifacts/src/main/resources/messages_en.properties Fri Jun 28 14:11:58 2013 +0200
@@ -438,6 +438,8 @@
wsplgen.job.queued = WSPLGEN job in queue.
wsplgen.job.error = An unexpected error while starting WSPLGEN occured.
+official.line.found = Found official line for {0}.
+
wsp.selected.string = {0}
Mosel = Mosel
More information about the Dive4elements-commits
mailing list