Mercurial > lada > lada-server
comparison src/main/java/de/intevation/lada/validation/rules/probe/DeskriptorToUmwelt.java @ 1097:186d602e031a
Merged branch schema-update into default.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 14 Oct 2016 18:17:42 +0200 |
parents | bcaf30a871ef |
children | 18c789672b14 |
comparison
equal
deleted
inserted
replaced
1096:565c8a67034d | 1097:186d602e031a |
---|---|
10 import java.util.ArrayList; | 10 import java.util.ArrayList; |
11 import java.util.List; | 11 import java.util.List; |
12 | 12 |
13 import javax.inject.Inject; | 13 import javax.inject.Inject; |
14 | 14 |
15 import de.intevation.lada.model.land.LProbe; | 15 import de.intevation.lada.model.land.Probe; |
16 import de.intevation.lada.model.stamm.DeskriptorUmwelt; | 16 import de.intevation.lada.model.stammdaten.DeskriptorUmwelt; |
17 import de.intevation.lada.model.stamm.Deskriptoren; | 17 import de.intevation.lada.model.stammdaten.Deskriptoren; |
18 import de.intevation.lada.util.annotation.RepositoryConfig; | 18 import de.intevation.lada.util.annotation.RepositoryConfig; |
19 import de.intevation.lada.util.data.QueryBuilder; | 19 import de.intevation.lada.util.data.QueryBuilder; |
20 import de.intevation.lada.util.data.Repository; | 20 import de.intevation.lada.util.data.Repository; |
21 import de.intevation.lada.util.data.RepositoryType; | 21 import de.intevation.lada.util.data.RepositoryType; |
22 import de.intevation.lada.util.rest.Response; | 22 import de.intevation.lada.util.rest.Response; |
37 @RepositoryConfig(type=RepositoryType.RO) | 37 @RepositoryConfig(type=RepositoryType.RO) |
38 private Repository repository; | 38 private Repository repository; |
39 | 39 |
40 @Override | 40 @Override |
41 public Violation execute(Object object) { | 41 public Violation execute(Object object) { |
42 LProbe probe = (LProbe)object; | 42 Probe probe = (Probe)object; |
43 if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) { | 43 if (probe.getMediaDesk() == null || probe.getMediaDesk().equals("")) { |
44 return null; | 44 return null; |
45 } | 45 } |
46 if (probe.getUmwId() == null) { | 46 if (probe.getUmwId() == null) { |
47 return null; | 47 return null; |
202 data.get(i).getS11().equals(media.get(11))) | 202 data.get(i).getS11().equals(media.get(11))) |
203 found = true; | 203 found = true; |
204 else | 204 else |
205 found = false; | 205 found = false; |
206 break; | 206 break; |
207 case 12: if (data.get(i).getS12() == null || | |
208 data.get(i).getS12().equals(media.get(12))) | |
209 found = true; | |
210 else | |
211 found = false; | |
212 break; | |
213 } | 207 } |
214 if (found) { | 208 if (found) { |
215 return null; | 209 return null; |
216 } | 210 } |
217 } | 211 } |