comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java @ 1038:9981452c7e75

First step: Added a new state handling the selection between vector or scalar and a new transition in timeseries to provide vector values (issue27). gnv-artifacts/trunk@1110 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 18 May 2010 16:28:05 +0000
parents c07d9f9a738c
children cc4ec127d666
comparison
equal deleted inserted replaced
1037:da4306683186 1038:9981452c7e75
251 boolean valid = InputValidator.isInputValid(tmpItem.getValue(), 251 boolean valid = InputValidator.isInputValid(tmpItem.getValue(),
252 inputValue.getType()); 252 inputValue.getType());
253 if (valid) { 253 if (valid) {
254 254
255 if (tmpItem.getName().equals(this.dataName)){ 255 if (tmpItem.getName().equals(this.dataName)){
256 String[] desc = getDescriptionForInputData(tmpItem, uuid); 256 String[] desc = getDescriptionForInputData(
257 tmpItem, context, uuid);
257 tmpItem.setDescription(desc); 258 tmpItem.setDescription(desc);
258 } 259 }
259 this.inputData.put(tmpItem.getName(), tmpItem); 260 this.inputData.put(tmpItem.getName(), tmpItem);
260 } else { 261 } else {
261 String msg = resFactory.getRessource( 262 String msg = resFactory.getRessource(
299 return ArtifactXMLUtilities.createInputExceptionReport( 300 return ArtifactXMLUtilities.createInputExceptionReport(
300 msg, XMLUtils.newDocument()); 301 msg, XMLUtils.newDocument());
301 } 302 }
302 303
303 304
304 protected String[] getDescriptionForInputData(InputData data, String uuid) { 305 protected String[] getDescriptionForInputData(
306 InputData data, CallContext context, String uuid)
307 {
305 // there is only one element in the list, so take the first 308 // there is only one element in the list, so take the first
306 Object obj = getDescibeData(uuid).get(0); 309 Object obj = getDescibeData(uuid).get(0);
307 List descs = new ArrayList(); 310 List descs = new ArrayList();
308 311
309 if (obj instanceof NamedArrayList) { 312 if (obj instanceof NamedArrayList) {

http://dive4elements.wald.intevation.org