comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/SingleInputTransition.java @ 171:7fb9441dd8af

Format Code to max 80 Chars per Row and Cleanup gnv-artifacts/trunk@208 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 09 Oct 2009 07:54:48 +0000
parents bb45c5097cb6
children d87347142702
comparison
equal deleted inserted replaced
170:7be22e76c270 171:7fb9441dd8af
11 import de.intevation.gnv.geobackend.base.Result; 11 import de.intevation.gnv.geobackend.base.Result;
12 import de.intevation.gnv.transition.describedata.DefaultSingleValueDescribeData; 12 import de.intevation.gnv.transition.describedata.DefaultSingleValueDescribeData;
13 13
14 /** 14 /**
15 * @author Tim Englich <tim.englich@intevation.de> 15 * @author Tim Englich <tim.englich@intevation.de>
16 * 16 *
17 */ 17 */
18 public class SingleInputTransition extends TransitionBase { 18 public class SingleInputTransition extends TransitionBase {
19 19
20 /** 20 /**
21 * the logger, used to log exceptions and additonaly information 21 * the logger, used to log exceptions and additonaly information
22 */ 22 */
23 private static Logger log = Logger.getLogger(SingleInputTransition.class); 23 private static Logger log = Logger.getLogger(SingleInputTransition.class);
24 24
25 /** 25 /**
26 * 26 *
27 */ 27 */
28 private static final long serialVersionUID = -6169497306324917318L; 28 private static final long serialVersionUID = -6169497306324917318L;
29 29
39 public boolean validate() { 39 public boolean validate() {
40 return true; 40 return true;
41 } 41 }
42 42
43 /** 43 /**
44 * @see de.intevation.gnv.transition.TransitionBase#purifyResult(java.util.Collection, java.lang.String) 44 * @see de.intevation.gnv.transition.TransitionBase#purifyResult(java.util.Collection,
45 * java.lang.String)
45 */ 46 */
46 @Override 47 @Override
47 protected void purifyResult(Collection<Result> result, String uuid) { 48 protected void purifyResult(Collection<Result> result, String uuid) {
48 log.debug("SingleInputTransition.purifyResult"); 49 log.debug("SingleInputTransition.purifyResult");
49 if (this.descibeData == null){ 50 if (this.descibeData == null) {
50 this.descibeData = new ArrayList<Object>(); 51 this.descibeData = new ArrayList<Object>();
51 } 52 }
52 String value = null; 53 String value = null;
53 if (result != null && result.size() == 1){ 54 if (result != null && result.size() == 1) {
54 Result tmpItem = result.iterator().next(); 55 Result tmpItem = result.iterator().next();
55 value = tmpItem.getObject("MAX").toString(); 56 value = tmpItem.getObject("MAX").toString();
56 }else{ 57 } else {
57 value = ""; 58 value = "";
58 } 59 }
59 60
60 this.descibeData.add(new DefaultSingleValueDescribeData(this.dataName, value)); 61 this.descibeData.add(new DefaultSingleValueDescribeData(this.dataName,
62 value));
61 } 63 }
62
63 64
64 } 65 }

http://dive4elements.wald.intevation.org