Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java @ 1062:ee105e5d5ead
Repaired broken river wms initialization.
flys-artifacts/trunk@2537 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 23 Aug 2011 15:32:33 +0000 |
parents | ae198bef4ba0 |
children | d2a17e990c70 |
comparison
equal
deleted
inserted
replaced
1061:b1b0a0b61845 | 1062:ee105e5d5ead |
---|---|
72 | 72 |
73 public static final String XPATH_THEME_MAPPINGS = | 73 public static final String XPATH_THEME_MAPPINGS = |
74 "/themes/mappings/mapping"; | 74 "/themes/mappings/mapping"; |
75 | 75 |
76 public static final String XPATH_RIVER_WMS = | 76 public static final String XPATH_RIVER_WMS = |
77 "/artifact-database/floodmap/river-wms"; | 77 "/artifact-database/floodmap/river"; |
78 | 78 |
79 /** | 79 /** |
80 * Creates a new FLYSArtifactContext object and initialize all | 80 * Creates a new FLYSArtifactContext object and initialize all |
81 * components required by the application. | 81 * components required by the application. |
82 * | 82 * |
375 int num = rivers != null ? rivers.getLength() : 0; | 375 int num = rivers != null ? rivers.getLength() : 0; |
376 | 376 |
377 for (int i = 0; i < num; i++) { | 377 for (int i = 0; i < num; i++) { |
378 Element e = (Element) rivers.item(i); | 378 Element e = (Element) rivers.item(i); |
379 | 379 |
380 String river = e.getAttribute("river"); | 380 String river = e.getAttribute("name"); |
381 String url = e.getAttribute("url"); | 381 String url = XMLUtils.xpathString(e, "river-wms/@url", null); |
382 | 382 |
383 if (river != null && url != null) { | 383 if (river != null && url != null) { |
384 riverWMS.put(river, url); | 384 riverWMS.put(river, url); |
385 } | 385 } |
386 } | 386 } |