Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.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 | 4896d4f94bdc |
children | ee2d4134d0b3 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java Wed Oct 21 11:10:28 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java Thu Oct 22 08:50:21 2009 +0000 @@ -7,9 +7,9 @@ import java.util.ArrayList; import java.util.Collection; -import net.sf.ehcache.Element; import org.apache.log4j.Logger; +import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -78,13 +78,10 @@ this.outputModes = new ArrayList<OutputMode>(outputModeList .getLength()); for (int i = 0; i < outputModeList.getLength(); i++) { - Node currentNode = outputModeList.item(i); - String name = Config.getStringXPath(currentNode, "@name"); - String description = Config.getStringXPath(currentNode, - "@description"); - String mimeType = Config.getStringXPath(currentNode, - "@mime-type"); - + Element currentNode = (Element)outputModeList.item(i); + String name = currentNode.getAttribute("name"); + String description =currentNode.getAttribute("description"); + String mimeType = currentNode.getAttribute("mime-type"); NodeList inputValuesList = Config.getNodeSetXPath(currentNode, "parameters/inputvalue"); Collection<InputValue> inputParameters = null; @@ -92,13 +89,10 @@ inputParameters = new ArrayList<InputValue>(inputValuesList .getLength()); for (int j = 0; j < inputValuesList.getLength(); j++) { - Node currentInputValuesNode = inputValuesList.item(j); - String inputValueName = Config.getStringXPath( - currentInputValuesNode, "@name"); - String inputValueType = Config.getStringXPath( - currentInputValuesNode, "@type"); - String defaultValue = Config.getStringXPath( - currentInputValuesNode, "@value"); + Element currentInputValuesNode = (Element)inputValuesList.item(j); + String inputValueName = currentInputValuesNode.getAttribute("name"); + String inputValueType = currentInputValuesNode.getAttribute("type"); + String defaultValue =currentInputValuesNode.getAttribute("value"); boolean isMultiselect = false; InputValue inputValue = new DefaultInputValue( inputValueName, inputValueType, defaultValue, @@ -144,7 +138,7 @@ if (CacheFactory.getInstance().isInitialized()) { String key = uuid + super.getID(); log.debug("Hash for Queryelements: " + key); - Element value = CacheFactory.getInstance().getCache().get(key); + net.sf.ehcache.Element value = CacheFactory.getInstance().getCache().get(key); if (value != null) { return (Collection<Result>) (value.getObjectValue()); } @@ -157,7 +151,7 @@ if (CacheFactory.getInstance().isInitialized()) { String key = uuid + super.getID(); log.debug("Hash for Queryelements: " + key); - Element value = CacheFactory.getInstance().getCache().get(key); + net.sf.ehcache.Element value = CacheFactory.getInstance().getCache().get(key); if (value != null) { CacheFactory.getInstance().getCache().remove(key); } @@ -174,7 +168,7 @@ if (CacheFactory.getInstance().isInitialized()) { String key = uuid + super.getID(); log.debug("Hash for Queryelements: " + key); - CacheFactory.getInstance().getCache().put(new Element(key, result)); + CacheFactory.getInstance().getCache().put(new net.sf.ehcache.Element(key, result)); } }