changeset 3209:03fc05655258

SQ: Added artifact access stub. flys-artifacts/trunk@4828 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 28 Jun 2012 15:06:58 +0000
parents 90c4ce100ce1
children ae14f412ba10
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/Access.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java
diffstat 4 files changed, 57 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Jun 28 14:55:58 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Jun 28 15:06:58 2012 +0000
@@ -1,3 +1,14 @@
+2012-06-28	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java:
+	  New. Artifact access for the S/Q relation. TODO: Add more parameters.
+
+	* src/main/java/de/intevation/flys/artifacts/access/Access.java:
+	  Remove trailing whitespace.
+
+	* src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java:
+	  Added more debug output.
+
 2012-06-28	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/access/Access.java: New.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/Access.java	Thu Jun 28 14:55:58 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/Access.java	Thu Jun 28 15:06:58 2012 +0000
@@ -15,7 +15,7 @@
 
 import org.apache.log4j.Logger;
 
-public class Access 
+public class Access
 {
     private static Logger log = Logger.getLogger(Access.class);
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java	Thu Jun 28 14:55:58 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/FixationArtifactAccess.java	Thu Jun 28 15:06:58 2012 +0000
@@ -140,6 +140,10 @@
             qSectorStart = getInteger("q1");
         }
 
+        if (log.isDebugEnabled()) {
+            log.debug("q1: '" + qSectorStart + "'");
+        }
+
         return qSectorStart;
     }
 
@@ -149,6 +153,10 @@
             qSectorEnd = getInteger("q2");
         }
 
+        if (log.isDebugEnabled()) {
+            log.debug("q2: '" + qSectorEnd + "'");
+        }
+
         return qSectorEnd;
     }
 
@@ -156,6 +164,9 @@
         if (events == null) {
             events = getIntArray("events");
         }
+        if (log.isDebugEnabled() && events != null) {
+            log.debug("events: " + Arrays.toString(events));
+        }
         return events;
     }
 
@@ -199,6 +210,9 @@
         if (preprocessing == null) {
             preprocessing = getBoolean("preprocessing");
         }
+        if (log.isDebugEnabled()) {
+            log.debug("preprocessing: " + preprocessing);
+        }
         return preprocessing;
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/SQRelationAccess.java	Thu Jun 28 15:06:58 2012 +0000
@@ -0,0 +1,31 @@
+package de.intevation.flys.artifacts.access;
+
+import de.intevation.flys.artifacts.FLYSArtifact;
+
+import org.apache.log4j.Logger;
+
+public class SQRelationAccess
+extends      Access
+{
+    private static Logger log = Logger.getLogger(SQRelationAccess.class);
+
+    protected String river;
+
+    public SQRelationAccess() {
+    }
+
+    public SQRelationAccess(FLYSArtifact artifact) {
+        super(artifact);
+    }
+
+    public String getRiver() {
+        if (river == null) {
+            river = getString("river");
+        }
+        if (log.isDebugEnabled()) {
+            log.debug("river: '" + river + "'");
+        }
+        return river;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org