diff artifacts/src/main/java/org/dive4elements/river/artifacts/access/DGMAccess.java @ 7055:1f38656b68c4

DGM SRIds are now fetched from database instead of configuration.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 19 Sep 2013 16:27:33 +0200
parents
children a805211690f7
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/access/DGMAccess.java	Thu Sep 19 16:27:33 2013 +0200
@@ -0,0 +1,35 @@
+package org.dive4elements.river.artifacts.access;
+
+import org.dive4elements.river.artifacts.D4EArtifact;
+import org.dive4elements.river.model.DGM;
+
+public class DGMAccess
+extends      RangeAccess
+{
+    private DGM dgm;
+
+    private String geoJSON;
+
+    public DGMAccess() {
+    }
+
+    public DGMAccess(D4EArtifact artifact) {
+        super(artifact);
+    }
+
+    public DGM getDGM() {
+        if (dgm == null) {
+            Integer sridId = getInteger("dgm");
+            dgm = DGM.getDGM(sridId);
+        }
+        return dgm;
+    }
+
+    public String getGeoJSON() {
+        if (geoJSON == null) {
+            geoJSON = getString("uesk.barriers");
+        }
+        return geoJSON;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org