Mercurial > lada > lada-server
changeset 650:55177afef263
Renamed package for messwert validation rules.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 05 May 2015 14:23:10 +0200 |
parents | 53816b76753a |
children | 0086dc4ac72e |
files | src/main/java/de/intevation/lada/validation/rules/Messwert/HasMessunsicherheit.java src/main/java/de/intevation/lada/validation/rules/messwert/HasMessunsicherheit.java |
diffstat | 2 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- 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; - -@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; - } -}
--- /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; + +@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; + } +}