comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java @ 693:af393c5eb2c8 facets-slt

Write computed facets into artifacts describe document. flys-artifacts/branches/facets-slt@2133 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 16 Jun 2011 13:24:00 +0000
parents 22e4bffbe240
children 708b270dfd30
comparison
equal deleted inserted replaced
692:22e4bffbe240 693:af393c5eb2c8
244 List<String> prev = getPreviousStateIds(); 244 List<String> prev = getPreviousStateIds();
245 prev.add(getCurrentStateId()); 245 prev.add(getCurrentStateId());
246 246
247 setCurrentStateId(targetState); 247 setCurrentStateId(targetState);
248 248
249 logger.debug("Compute data for state: " + targetState);
250 compute(context, ComputeType.ADVANCE);
251
249 return describe(target, context); 252 return describe(target, context);
250 } 253 }
251 else if (isPreviousState(targetState, context)) { 254 else if (isPreviousState(targetState, context)) {
252 logger.info("Advance: Step back to"); 255 logger.info("Advance: Step back to");
253 256
261 prevs.remove(prev); 264 prevs.remove(prev);
262 facets.remove(prev); 265 facets.remove(prev);
263 } 266 }
264 267
265 setCurrentStateId(targetState); 268 setCurrentStateId(targetState);
266
267 compute(context, ComputeType.ADVANCE);
268 269
269 return describe(target, context); 270 return describe(target, context);
270 } 271 }
271 272
272 logger.warn("Advance: Cannot advance to '" + targetState + "'"); 273 logger.warn("Advance: Cannot advance to '" + targetState + "'");
1069 * cache. 1070 * cache.
1070 * 1071 *
1071 * @return the computed data. 1072 * @return the computed data.
1072 */ 1073 */
1073 public Object compute(CallContext context, String hash, ComputeType type) { 1074 public Object compute(CallContext context, String hash, ComputeType type) {
1074 String calc = (String) getData(CalculationSelect.FIELD_MODE).getValue();
1075
1076 DefaultState current = (DefaultState) getCurrentState(context); 1075 DefaultState current = (DefaultState) getCurrentState(context);
1076
1077 logger.debug("Create ComputeCallback for state: " + current.getID());
1077 1078
1078 ComputeCallback callback = current.createComputeCallback(hash(), this); 1079 ComputeCallback callback = current.createComputeCallback(hash(), this);
1079 1080
1080 if (callback == null) { 1081 if (callback == null) {
1081 logger.info("There is no data which needs to be computed."); 1082 logger.info("There is no data which needs to be computed.");

http://dive4elements.wald.intevation.org