diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixRealizingAccess.java @ 3468:f37e7e8907cb

merged flys-artifacts/2.8.1
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:39 +0200
parents c1fd75bd893a
children acfd48384835
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixRealizingAccess.java	Fri Sep 28 12:14:39 2012 +0200
@@ -0,0 +1,53 @@
+package de.intevation.flys.artifacts.access;
+
+import de.intevation.flys.artifacts.FLYSArtifact;
+
+import de.intevation.flys.artifacts.model.Segment;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
+public class FixRealizingAccess
+extends      FixAccess
+{
+    private static Logger log = Logger.getLogger(FixRealizingAccess.class);
+
+    protected Boolean isQ;
+
+    protected List<Segment> segments;
+
+    public FixRealizingAccess() {
+    }
+
+    public FixRealizingAccess(FLYSArtifact artifact) {
+        super(artifact);
+    }
+
+    public Boolean isQ() {
+        if (isQ == null) {
+            isQ = getBoolean("wq_isq");
+        }
+
+        if (log.isDebugEnabled()) {
+            log.debug("isQ: " + isQ);
+        }
+
+        return isQ;
+    }
+
+    public List<Segment> getSegments() {
+        if (segments == null) {
+            String segmentsS = getString("wq_values");
+            if (segmentsS != null) {
+                segments = Segment.parseSegments(segmentsS);
+            }
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("segments: " + segments);
+        }
+
+        return segments;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org