annotate gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java @ 111:065ec0a29394

Integrate the type Point into the ArtifactMethod. Integrate Responstest for feed-Requests into the JUnitTest gnv-artifacts/trunk@160 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 29 Sep 2009 15:30:03 +0000
parents bb45c5097cb6
children ef157bd2fa92
rev   line source
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.transition;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
6 import java.io.OutputStream;
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 import java.util.ArrayList;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
8 import java.util.Collection;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
10 import net.sf.ehcache.Element;
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
11
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 import org.apache.log4j.Logger;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 import org.w3c.dom.Node;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
14 import org.w3c.dom.NodeList;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16 import de.intevation.artifactdatabase.Config;
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
17 import de.intevation.gnv.artifacts.cache.CacheFactory;
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
18 import de.intevation.gnv.geobackend.base.Result;
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
19 import de.intevation.gnv.transition.exception.TransitionException;
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 /**
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 * @author Tim Englich <tim.englich@intevation.de>
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 *
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 */
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25 public abstract class OutputTransitionBase extends TransitionBase implements
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 OutputTransition {
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
27
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
28
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
29 /**
91
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
30 * The UID of this Class
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
31 */
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
32 private static final long serialVersionUID = -1718732895737303823L;
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
33
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 /**
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 * the logger, used to log exceptions and additonaly information
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 */
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 private static Logger log = Logger.getLogger(OutputTransitionBase.class);
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
38
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
39
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
40 /**
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
41 * The different Outputmodes which are provided by an OutputTransition
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
42 */
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 protected Collection<OutputMode> outputModes = null;
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
44
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 /**
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 * Constructor
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 */
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48 public OutputTransitionBase() {
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 super();
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 }
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 /**
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 * @see de.intevation.gnv.transition.OutputTransition#getOutputModes()
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 */
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 public Collection<OutputMode> getOutputModes() {
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56 log.debug("OutputTransitionBase.getOutputModes");
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 return this.outputModes;
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 }
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
59 /**
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
60 * @see de.intevation.gnv.transition.Transition#validate()
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
61 */
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
62 public boolean validate() {
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
63 log.debug("OutputTransitionBase.validate");
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
64 return true;
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
65 }
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
66
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
67 /**
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
68 * @see de.intevation.gnv.transition.TransitionBase#setup(org.w3c.dom.Node)
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
69 */
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
70 @Override
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
71 public void setup(Node configuration) {
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
72 log.debug("OutputTransitionBase.setup");
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
73 super.setup(configuration);
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
74 NodeList outputModeList = Config.getNodeSetXPath(configuration, "outputsModes/outputsMode");
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
75 if (outputModeList != null){
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
76 log.debug(outputModeList.getLength()+ " were found.");
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
77 this.outputModes = new ArrayList<OutputMode>(outputModeList.getLength());
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
78 for (int i = 0; i < outputModeList.getLength(); i++){
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
79 Node currentNode = outputModeList.item(i);
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
80 String name = Config.getStringXPath(currentNode, "@name");
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
81 String description = Config.getStringXPath(currentNode, "@description");
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
82 String mimeType = Config.getStringXPath(currentNode, "@mime-type");
91
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
83
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
84 NodeList inputValuesList = Config.getNodeSetXPath(currentNode, "parameters/inputvalue");
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
85 Collection<InputValue> inputParameters = null;
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
86 if (inputValuesList != null){
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
87 inputParameters = new ArrayList<InputValue>(inputValuesList.getLength());
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
88 for (int j = 0 ; j < inputValuesList.getLength(); j++){
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
89 Node currentInputValuesNode = inputValuesList.item(j);
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
90 String inputValueName = Config.getStringXPath(currentInputValuesNode, "@name");
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
91 String inputValueType = Config.getStringXPath(currentInputValuesNode, "@type");
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
92 String defaultValue = Config.getStringXPath(currentInputValuesNode, "@value");
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
93 boolean isMultiselect = false;
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
94 InputValue inputValue = new DefaultInputValue(inputValueName, inputValueType, defaultValue, isMultiselect);
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
95 inputParameters.add(inputValue);
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
96 }
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
97 }
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
98
bd284d8306db Added Support for Patameters in OutputModes
Tim Englich <tim.englich@intevation.de>
parents: 86
diff changeset
99 OutputMode outputMode = new DefaultOutputMode(name, description, mimeType,inputParameters);
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
100 log.debug(outputMode.toString());
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
101 this.outputModes.add(outputMode);
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
102
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
103 }
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
104 }
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
105 }
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
106
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
107 /**
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
108 * @see de.intevation.gnv.transition.TransitionBase#advance()
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
109 */
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
110 @Override
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
111 public void advance(String uuid) throws TransitionException {
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
112 log.debug("OutputTransitionBase.advance");
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
113 if (this.getChartResult(uuid) == null){
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
114 super.advance(uuid);
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
115 }
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
116 }
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
117
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
118 /**
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
119 * @see de.intevation.gnv.transition.OutputTransition#out(java.lang.String, java.util.Collection, java.io.OutputStream)
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
120 */
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
121 public void out(String outputMode, Collection<InputData> inputData,
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
122 OutputStream outputStream) throws TransitionException {
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
123 }
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
124
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
125 /**
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
126 * @return
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
127 */
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
128 protected Collection<Result> getChartResult(String uuid) {
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
129 log.debug("OutputTransitionBase.getChartResult");
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
130 if (CacheFactory.getInstance().isInitialized()){
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
131 String key = uuid+super.getID();
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
132 log.debug("Hash for Queryelements: "+key);
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
133 Element value = CacheFactory.getInstance().getCache().get(key);
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
134 if (value != null){
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
135 return (Collection<Result>)(value.getObjectValue());
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
136 }
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
137 }
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
138 return null;
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
139 }
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
140
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
141 /**
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
142 * @see de.intevation.gnv.transition.TransitionBase#purifyResult(java.util.Collection, java.lang.String)
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
143 */
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
144 @Override
99
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
145 protected void purifyResult(Collection<Result> result, String uuid) {
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
146 log.debug("OutputTransitionBase.purifyResult");
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
147 if (CacheFactory.getInstance().isInitialized()){
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
148 String key = uuid+super.getID();
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
149 log.debug("Hash for Queryelements: "+key);
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
150 CacheFactory.getInstance().getCache().put(new Element(key, result));
bb45c5097cb6 ehcache Integration for storing the chartresultvalues
Tim Englich <tim.englich@intevation.de>
parents: 91
diff changeset
151 }
86
5d4f5d26bb7a Some Codecleanup done
Tim Englich <tim.englich@intevation.de>
parents: 64
diff changeset
152 }
64
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
153
5db77e0a8594 Integrated Output Methods and Interfacsstructure
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
154 }

http://dive4elements.wald.intevation.org