[Lada-commits] [PATCH 1 of 3] Renamed package for messwert validation rules
Wald Commits
scm-commit at wald.intevation.org
Tue May 5 14:23:14 CEST 2015
# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1430828590 -7200
# Node ID 55177afef263babbf762b4c317b25b3eceed8c11
# Parent 53816b76753a7ec4dfafb8dee0fb559426ecf3ba
Renamed package for messwert validation rules.
diff -r 53816b76753a -r 55177afef263 src/main/java/de/intevation/lada/validation/rules/Messwert/HasMessunsicherheit.java
--- a/src/main/java/de/intevation/lada/validation/rules/Messwert/HasMessunsicherheit.java Tue May 05 14:10:15 2015 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-package de.intevation.lada.validation.rules.Messwert;
-
-import de.intevation.lada.model.land.LMesswert;
-import de.intevation.lada.validation.Violation;
-import de.intevation.lada.validation.annotation.ValidationRule;
-import de.intevation.lada.validation.rules.Rule;
-
- at ValidationRule("Messwert")
-public class HasMessunsicherheit implements Rule {
-
- @Override
- public Violation execute(Object object) {
- LMesswert messwert = (LMesswert)object;
- Float unsicherheit = messwert.getMessfehler();
- Float nachweisgrenze = messwert.getNwgZuMesswert();
- Float wert = messwert.getMesswert();
- if (unsicherheit != null && unsicherheit > 0f) {
- return null;
- }
- else if (nachweisgrenze != null && wert < nachweisgrenze) {
- return null;
- }
- Violation violation = new Violation();
- violation.addWarning("messwewrt", 631);
- return violation;
- }
-}
diff -r 53816b76753a -r 55177afef263 src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java Tue May 05 14:23:10 2015 +0200
@@ -0,0 +1,27 @@
+package de.intevation.lada.validation.rules.messwert;
+
+import de.intevation.lada.model.land.LMesswert;
+import de.intevation.lada.validation.Violation;
+import de.intevation.lada.validation.annotation.ValidationRule;
+import de.intevation.lada.validation.rules.Rule;
+
+ at ValidationRule("Messwert")
+public class HasMessunsicherheit implements Rule {
+
+ @Override
+ public Violation execute(Object object) {
+ LMesswert messwert = (LMesswert)object;
+ Float unsicherheit = messwert.getMessfehler();
+ Float nachweisgrenze = messwert.getNwgZuMesswert();
+ Float wert = messwert.getMesswert();
+ if (unsicherheit != null && unsicherheit > 0f) {
+ return null;
+ }
+ else if (nachweisgrenze != null && wert < nachweisgrenze) {
+ return null;
+ }
+ Violation violation = new Violation();
+ violation.addWarning("messwewrt", 631);
+ return violation;
+ }
+}
More information about the Lada-commits
mailing list