Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java @ 2742:faf73245ec73
Improved startup performance.
flys-artifacts/trunk@4476 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Wed, 23 May 2012 11:02:50 +0000 |
parents | 83b22ccf48da |
children | fb11bd37ddb8 |
comparison
equal
deleted
inserted
replaced
2741:0251393f037c | 2742:faf73245ec73 |
---|---|
366 | 366 |
367 Map<String, List<ThemeMapping>> mapping = | 367 Map<String, List<ThemeMapping>> mapping = |
368 new HashMap<String, List<ThemeMapping>>(); | 368 new HashMap<String, List<ThemeMapping>>(); |
369 | 369 |
370 for (int i = 0; i < num; i++) { | 370 for (int i = 0; i < num; i++) { |
371 Node node = mappings.item(i); | 371 Element node = (Element)mappings.item(i); |
372 | 372 |
373 String from = (String) XMLUtils.xpath( | 373 String from = node.getAttribute("from"); |
374 node, "@from", XPathConstants.STRING); | 374 String to = node.getAttribute("to"); |
375 | 375 String pattern = node.getAttribute("pattern"); |
376 String to = (String) XMLUtils.xpath( | 376 String masterAttrPattern = node.getAttribute("masterAttr"); |
377 node, "@to", XPathConstants.STRING); | 377 String outputPattern = node.getAttribute("output"); |
378 | 378 |
379 String pattern = (String) XMLUtils.xpath( | 379 if (from.length() > 0 && to.length() > 0) { |
380 node, "@pattern", XPathConstants.STRING); | |
381 | |
382 String masterAttrPattern = (String) XMLUtils.xpath( | |
383 node, "@masterAttr", XPathConstants.STRING); | |
384 | |
385 String outputPattern = (String) XMLUtils.xpath( | |
386 node, "@output", XPathConstants.STRING); | |
387 | |
388 if (from != null && to != null) { | |
389 List<ThemeMapping> tm = mapping.get(from); | 380 List<ThemeMapping> tm = mapping.get(from); |
390 | 381 |
391 if (tm == null) { | 382 if (tm == null) { |
392 tm = new ArrayList<ThemeMapping>(); | 383 tm = new ArrayList<ThemeMapping>(); |
393 mapping.put(from, tm); | 384 mapping.put(from, tm); |