comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java @ 91:bd284d8306db

Added Support for Patameters in OutputModes gnv-artifacts/trunk@135 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 25 Sep 2009 14:37:10 +0000
parents 5d4f5d26bb7a
children bb45c5097cb6
comparison
equal deleted inserted replaced
90:6bdef6e590d6 91:bd284d8306db
21 public abstract class OutputTransitionBase extends TransitionBase implements 21 public abstract class OutputTransitionBase extends TransitionBase implements
22 OutputTransition { 22 OutputTransition {
23 23
24 24
25 /** 25 /**
26 * Thie UID of this Class 26 * The UID of this Class
27 */ 27 */
28 private static final long serialVersionUID = -1718732895737303823L; 28 private static final long serialVersionUID = -1718732895737303823L;
29 29
30 /** 30 /**
31 * the logger, used to log exceptions and additonaly information 31 * the logger, used to log exceptions and additonaly information
78 for (int i = 0; i < outputModeList.getLength(); i++){ 78 for (int i = 0; i < outputModeList.getLength(); i++){
79 Node currentNode = outputModeList.item(i); 79 Node currentNode = outputModeList.item(i);
80 String name = Config.getStringXPath(currentNode, "@name"); 80 String name = Config.getStringXPath(currentNode, "@name");
81 String description = Config.getStringXPath(currentNode, "@description"); 81 String description = Config.getStringXPath(currentNode, "@description");
82 String mimeType = Config.getStringXPath(currentNode, "@mime-type"); 82 String mimeType = Config.getStringXPath(currentNode, "@mime-type");
83 OutputMode outputMode = new DefaultOutputMode(name, description, mimeType); 83
84 NodeList inputValuesList = Config.getNodeSetXPath(currentNode, "parameters/inputvalue");
85 Collection<InputValue> inputParameters = null;
86 if (inputValuesList != null){
87 inputParameters = new ArrayList<InputValue>(inputValuesList.getLength());
88 for (int j = 0 ; j < inputValuesList.getLength(); j++){
89 Node currentInputValuesNode = inputValuesList.item(j);
90 String inputValueName = Config.getStringXPath(currentInputValuesNode, "@name");
91 String inputValueType = Config.getStringXPath(currentInputValuesNode, "@type");
92 String defaultValue = Config.getStringXPath(currentInputValuesNode, "@value");
93 boolean isMultiselect = false;
94 InputValue inputValue = new DefaultInputValue(inputValueName, inputValueType, defaultValue, isMultiselect);
95 inputParameters.add(inputValue);
96 }
97 }
98
99 OutputMode outputMode = new DefaultOutputMode(name, description, mimeType,inputParameters);
84 log.debug(outputMode.toString()); 100 log.debug(outputMode.toString());
85 this.outputModes.add(outputMode); 101 this.outputModes.add(outputMode);
86 102
87 } 103 }
88 } 104 }

http://dive4elements.wald.intevation.org