Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java @ 205:6e7952fd1744
Added the support to Display the Time and the position of an Measurement in an VerticalProfile of Type Instantaneous Point
gnv-artifacts/trunk@261 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 22 Oct 2009 14:02:30 +0000 |
parents | 72bd41ba548d |
children | d87347142702 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java Thu Oct 22 08:50:21 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/CoordinateSelectionTransition.java Thu Oct 22 14:02:30 2009 +0000 @@ -103,10 +103,21 @@ NamedCollection<KeyValueDescibeData> keyValueDescibeData = new NamedArrayList<KeyValueDescibeData>( this.dataName, result.size()); keyValueDescibeData.setMultiSelect(this.dataMultiSelect); + String prevKey = null; while (rit.hasNext()) { Result resultValue = rit.next(); - keyValueDescibeData.add(new DefaultKeyValueDescribeData(resultValue - .getString(keyid), this.convert2DisplayCoordinate(resultValue.getString(valueid)))); + String key = resultValue.getString(keyid); + if(prevKey == null || !prevKey.equals(key)){ // müssen wir so machen, da die sde kein select distinct auf layern zulässt. + String geomString = this.convert2DisplayCoordinate(resultValue.getString(valueid)); + String value = geomString; + if (resultValue.getResultDescriptor().getColumnIndex("VALUE") > 0){ + value = resultValue.getString("VALUE") + " - "+value; + } + + + keyValueDescibeData.add(new DefaultKeyValueDescribeData(key,value )); + } + prevKey = key; } return keyValueDescibeData; }