Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/OutputTransitionBase.java @ 300:6a3a02e004d9
Refactored process of chart generation. Charts will be generated via Chart-Interface from rev351 and no more via factory classes.
gnv-artifacts/trunk@354 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 20 Nov 2009 13:51:14 +0000 |
parents | 3d6d89bcbf42 |
children | 91c37bf28c0e |
comparison
equal
deleted
inserted
replaced
299:d6c75171f1e9 | 300:6a3a02e004d9 |
---|---|
143 return (Collection<Result>) (value.getObjectValue()); | 143 return (Collection<Result>) (value.getObjectValue()); |
144 } | 144 } |
145 } | 145 } |
146 return null; | 146 return null; |
147 } | 147 } |
148 | |
149 protected Object getChartFromCache(String uuid) { | |
150 log.debug("Fetch chart [" + uuid + "] from cache"); | |
151 CacheFactory cacheFactory = CacheFactory.getInstance(); | |
152 if (cacheFactory.isInitialized()) { | |
153 String key = "chart_" + uuid + super.getID(); | |
154 net.sf.ehcache.Element object = cacheFactory.getCache().get(key); | |
155 | |
156 if (object != null) { | |
157 return object.getObjectValue(); | |
158 } | |
159 } | |
160 return null; | |
161 } | |
148 | 162 |
149 protected Collection<Result> getODVResult(String uuid) { | 163 protected Collection<Result> getODVResult(String uuid) { |
150 log.debug("OutputTransitionBase.getODVResult"); | 164 log.debug("OutputTransitionBase.getODVResult"); |
151 // TODO add Caching? I think it's not nessessary | 165 // TODO add Caching? I think it's not nessessary |
152 Collection<Result> returnValue = null; | 166 Collection<Result> returnValue = null; |
195 log.debug("Hash for Queryelements: " + key); | 209 log.debug("Hash for Queryelements: " + key); |
196 CacheFactory.getInstance().getCache().put(new net.sf.ehcache.Element(key, result)); | 210 CacheFactory.getInstance().getCache().put(new net.sf.ehcache.Element(key, result)); |
197 } | 211 } |
198 } | 212 } |
199 | 213 |
214 | |
215 protected void purifyChart(Object chart, String uuid) { | |
216 log.debug("Prufify chart [" + uuid + "]"); | |
217 CacheFactory cacheFactory = CacheFactory.getInstance(); | |
218 if (cacheFactory.isInitialized()) { | |
219 String key = "chart_" + uuid + getID(); | |
220 cacheFactory.getCache().put(new net.sf.ehcache.Element(key, chart)); | |
221 } | |
222 } | |
223 | |
200 /** | 224 /** |
201 * @see de.intevation.gnv.transition.TransitionBase#putInputData(java.util.Collection, java.lang.String) | 225 * @see de.intevation.gnv.transition.TransitionBase#putInputData(java.util.Collection, java.lang.String) |
202 */ | 226 */ |
203 @Override | 227 @Override |
204 public void putInputData(Collection<InputData> inputData, | 228 public void putInputData(Collection<InputData> inputData, |