changeset 190:d40da430d2fe

Added stub code to write gauges flys-backend/trunk@1527 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 21 Mar 2011 09:52:26 +0000
parents bc3747a371cc
children c4fb5141ce11
files flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java flys-backend/src/main/java/de/intevation/flys/importer/Importer.java
diffstat 3 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Fri Mar 18 16:12:24 2011 +0000
+++ b/flys-backend/ChangeLog	Mon Mar 21 09:52:26 2011 +0000
@@ -1,3 +1,11 @@
+2011-03-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/importer/Importer.java:
+	  Added code to store rivers not only annotations.
+
+	* src/main/java/de/intevation/flys/importer/ImportRiver.java:
+	  Added stub code to write gauges.
+
 2011-03-17	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	First part of parsing main values.
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Fri Mar 18 16:12:24 2011 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportRiver.java	Mon Mar 21 09:52:26 2011 +0000
@@ -97,6 +97,11 @@
         annotations = aparser.getAnnotations();
     }
 
+    public void storeDependencies() {
+        storeAnnotations();
+        storeGauges();
+    }
+
     public void storeAnnotations() {
         River river = getPeer();
         for (ImportAnnotation annotation: annotations) {
@@ -104,6 +109,10 @@
         }
     }
 
+    public void storeGauges() {
+        // TODO: Implements me!
+    }
+
     public River getPeer() {
         if (peer == null) {
             Session session = Importer.sessionHolder.get();
--- a/flys-backend/src/main/java/de/intevation/flys/importer/Importer.java	Fri Mar 18 16:12:24 2011 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/Importer.java	Mon Mar 21 09:52:26 2011 +0000
@@ -47,7 +47,7 @@
 
         for (ImportRiver river: rivers) {
             log.debug("writing river '" + river.getName() + "'");
-            river.storeAnnotations();
+            river.storeDependencies();
             session.flush();
         }
 

http://dive4elements.wald.intevation.org