Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/artifacts/fis/FISArtifact.java @ 204:734ac082c8d1
Split the Configuration File in several small Documents to speed up the Artifactinstantiation and also make the administration of the Artifactdatabase easier. issue40 and issue59
gnv-artifacts/trunk@259 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 22 Oct 2009 08:50:21 +0000 |
parents | 7fb9441dd8af |
children | 3e82b4f1c455 |
comparison
equal
deleted
inserted
replaced
203:226091ed3cbd | 204:734ac082c8d1 |
---|---|
274 NodeList products = Config.getNodeSetXPath(artifactNode, | 274 NodeList products = Config.getNodeSetXPath(artifactNode, |
275 "products/product"); | 275 "products/product"); |
276 if (products != null) { | 276 if (products != null) { |
277 this.products = new HashMap<String, Product>(products | 277 this.products = new HashMap<String, Product>(products |
278 .getLength()); | 278 .getLength()); |
279 | |
279 for (int i = 0; i < products.getLength(); i++) { | 280 for (int i = 0; i < products.getLength(); i++) { |
280 Node productNode = products.item(i); | 281 Element productNode = (Element)products.item(i); |
281 String productName = Config.getStringXPath(productNode, | 282 String productName = productNode.getAttribute("name"); |
282 "@name"); | |
283 NodeList parameterNodes = Config.getNodeSetXPath( | 283 NodeList parameterNodes = Config.getNodeSetXPath( |
284 productNode, "parameters/parameter"); | 284 productNode, "parameters/parameter"); |
285 Collection<InputData> parameter = null; | 285 Collection<InputData> parameter = null; |
286 if (parameterNodes != null) { | 286 if (parameterNodes != null) { |
287 parameter = new ArrayList<InputData>(parameterNodes | 287 parameter = new ArrayList<InputData>(parameterNodes |
288 .getLength()); | 288 .getLength()); |
289 for (int j = 0; j < parameterNodes.getLength(); j++) { | 289 for (int j = 0; j < parameterNodes.getLength(); j++) { |
290 Node parameterNode = parameterNodes.item(j); | 290 Element parameterNode = (Element)parameterNodes.item(j); |
291 String name = Config.getStringXPath(parameterNode, | 291 String name = parameterNode.getAttribute("name"); |
292 "@name"); | 292 String value = parameterNode.getAttribute("value"); |
293 String value = Config.getStringXPath(parameterNode, | |
294 "@value"); | |
295 parameter.add(new DefaultInputData(name, value)); | 293 parameter.add(new DefaultInputData(name, value)); |
296 } | 294 } |
297 } | 295 } |
298 Node artifactFactoryNode = Config.getNodeXPath(productNode, | 296 Node artifactFactoryNode = Config.getNodeXPath(productNode, |
299 "artifact-factory"); | 297 "artifact-factory"); |