changeset 334:305c042c81e7

Export additional attributes for 'ort'.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 28 Aug 2013 15:08:47 +0200
parents d43d371900e4
children fa6ef372d471
files src/main/java/de/intevation/lada/data/exporter/LAFCreator.java
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/data/exporter/LAFCreator.java	Wed Aug 28 15:08:15 2013 +0200
+++ b/src/main/java/de/intevation/lada/data/exporter/LAFCreator.java	Wed Aug 28 15:08:47 2013 +0200
@@ -20,6 +20,7 @@
 import de.intevation.lada.model.LProbeInfo;
 import de.intevation.lada.model.LZusatzWert;
 import de.intevation.lada.model.Ort;
+import de.intevation.lada.model.SKoordinatenArt;
 import de.intevation.lada.model.SMessEinheit;
 import de.intevation.lada.model.SMessgroesse;
 import de.intevation.lada.model.SProbenZusatz;
@@ -187,6 +188,18 @@
             laf += lafLine("ORT_TYP", "\"" + o.getOrtsTyp() + "\"");
             laf += o.getOrtszusatztext() == null ? "":
                 lafLine("ORT_ZUSATZTEXT", "\"" + o.getOrtszusatztext() + "\"");
+            laf += lafLine("ORT_LAND_S", String.valueOf(ort.get(0).getStaatId()));
+            QueryBuilder<SKoordinatenArt> kaBuilder =
+                new QueryBuilder<SKoordinatenArt>(
+                    readonlyRepo.getEntityManager(), SKoordinatenArt.class);
+            kaBuilder.and("kdaId", ort.get(0).getKdaId());
+            Response kaResp = readonlyRepo.filter(kaBuilder.getQuery());
+            List<SKoordinatenArt> kas = (List<SKoordinatenArt>)kaResp.getData();
+            String koord = kas.get(0).getKoordinatenart() + " ";
+            koord += ort.get(0).getKoordXExtern() + " ";
+            koord += ort.get(0).getKoordYExtern();
+            laf += lafLine("ORT_KOORDINATEN_S", koord);
+            laf += lafLine("ORT_GEMEINDESCHLUESSEL", ort.get(0).getGemId());
         }
         return laf;
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)