comparison 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
comparison
equal deleted inserted replaced
4077:97de7a552b79 4078:0944cdd2ee90
1 package de.intevation.aft; 1 package de.intevation.aft;
2
3 import java.util.Map;
4 import java.util.HashMap;
2 5
3 import java.sql.ResultSet; 6 import java.sql.ResultSet;
4 import java.sql.SQLException; 7 import java.sql.SQLException;
5 8
6 import org.apache.log4j.Logger; 9 import org.apache.log4j.Logger;
10
11 import org.w3c.dom.Document;
12 import org.w3c.dom.NodeList;
13 import org.w3c.dom.Node;
14 import org.w3c.dom.Element;
7 15
8 import de.intevation.db.ConnectedStatements; 16 import de.intevation.db.ConnectedStatements;
9 17
10 public class River 18 public class River
11 extends IdPair 19 extends IdPair
22 this.name = name; 30 this.name = name;
23 } 31 }
24 32
25 public String getName() { 33 public String getName() {
26 return name; 34 return name;
35 }
36
37 protected static Map<Integer, Element> indexByNumber(Document document) {
38 Map<Integer, Element> map = new HashMap<Integer, Element>();
39 NodeList nodes = document.getElementsByTagName("PEGELSTATION");
40 for (int i = nodes.getLength()-1; i >= 0; --i) {
41 Element element = (Element)nodes.item(i);
42 String number = element.getAttribute("NUMMER");
43 }
44 return map;
27 } 45 }
28 46
29 public void sync(SyncContext context) throws SQLException { 47 public void sync(SyncContext context) throws SQLException {
30 log.info("sync river: " + this); 48 log.info("sync river: " + this);
31 49

http://dive4elements.wald.intevation.org