diff flys-aft/src/main/java/de/intevation/aft/River.java @ 4078:0944cdd2ee90

Load DIPS XML flys-aft/trunk@3453 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 16 Dec 2011 17:10:14 +0000
parents 97de7a552b79
children 42094f01afa6
line wrap: on
line diff
--- a/flys-aft/src/main/java/de/intevation/aft/River.java	Fri Dec 16 16:21:59 2011 +0000
+++ b/flys-aft/src/main/java/de/intevation/aft/River.java	Fri Dec 16 17:10:14 2011 +0000
@@ -1,10 +1,18 @@
 package de.intevation.aft;
 
+import java.util.Map;
+import java.util.HashMap;
+
 import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.apache.log4j.Logger;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+import org.w3c.dom.Element;
+
 import de.intevation.db.ConnectedStatements;
 
 public class River
@@ -26,6 +34,16 @@
         return name;
     }
 
+    protected static Map<Integer, Element> indexByNumber(Document document) {
+        Map<Integer, Element> map = new HashMap<Integer, Element>();
+        NodeList nodes = document.getElementsByTagName("PEGELSTATION");
+        for (int i = nodes.getLength()-1; i >= 0; --i) {
+            Element element = (Element)nodes.item(i);
+            String number = element.getAttribute("NUMMER");
+        }
+        return map;
+    }
+
     public void sync(SyncContext context) throws SQLException {
         log.info("sync river: " + this);
 

http://dive4elements.wald.intevation.org