Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java Wed May 23 10:17:06 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java Wed May 23 11:02:50 2012 +0000 @@ -368,24 +368,15 @@ new HashMap<String, List<ThemeMapping>>(); for (int i = 0; i < num; i++) { - Node node = mappings.item(i); - - String from = (String) XMLUtils.xpath( - node, "@from", XPathConstants.STRING); - - String to = (String) XMLUtils.xpath( - node, "@to", XPathConstants.STRING); + Element node = (Element)mappings.item(i); - String pattern = (String) XMLUtils.xpath( - node, "@pattern", XPathConstants.STRING); + String from = node.getAttribute("from"); + String to = node.getAttribute("to"); + String pattern = node.getAttribute("pattern"); + String masterAttrPattern = node.getAttribute("masterAttr"); + String outputPattern = node.getAttribute("output"); - String masterAttrPattern = (String) XMLUtils.xpath( - node, "@masterAttr", XPathConstants.STRING); - - String outputPattern = (String) XMLUtils.xpath( - node, "@output", XPathConstants.STRING); - - if (from != null && to != null) { + if (from.length() > 0 && to.length() > 0) { List<ThemeMapping> tm = mapping.get(from); if (tm == null) {