Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/context/RiverContextFactory.java @ 7072:4e597d435398 generator-refactoring
Read out generator class info from "class" attribute instead of tags text body.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 20 Sep 2013 15:29:02 +0200 |
parents | 5c6fd2c010dd |
children | beb9e94f04d3 |
comparison
equal
deleted
inserted
replaced
7071:50342c451512 | 7072:4e597d435398 |
---|---|
330 int idx = 0; | 330 int idx = 0; |
331 | 331 |
332 for (int i = 0; i < num; i++) { | 332 for (int i = 0; i < num; i++) { |
333 Element item = (Element)outGenerators.item(i); | 333 Element item = (Element)outGenerators.item(i); |
334 | 334 |
335 String name = (String) XMLUtils.xpath( | 335 String name = item.getAttribute("name"); |
336 item, "@name", XPathConstants.STRING); | 336 String clazz = item.getAttribute("class"); |
337 | 337 |
338 String clazz = (String) XMLUtils.xpath( | 338 if (name.isEmpty() || clazz.isEmpty()) { |
339 item, "text()", XPathConstants.STRING); | |
340 | |
341 if (name == null || clazz == null) { | |
342 continue; | 339 continue; |
343 } | 340 } |
344 | 341 |
345 try { | 342 try { |
346 generators.put( | 343 generators.put( |