comparison gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java @ 319:251f16a083f8

Added RegionFilter-Support to HorizontalProfile InstantaneousPoint gnv-artifacts/trunk@378 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 27 Nov 2009 13:00:00 +0000
parents ce408af0ee57
children 3eff9241ea1e
comparison
equal deleted inserted replaced
318:5f2820e821e0 319:251f16a083f8
553 553
554 if (this.dataNoSelect){ 554 if (this.dataNoSelect){
555 keyValueDescibeData.add(new DefaultKeyValueDescribeData(NODATASELECTIONKEY, 555 keyValueDescibeData.add(new DefaultKeyValueDescribeData(NODATASELECTIONKEY,
556 "No Selection")); 556 "No Selection"));
557 } 557 }
558 boolean initialized = false;
559 int keyPos= 0;
560 int valuePos = 1;
558 String previousKey = null; 561 String previousKey = null;
559 while (rit.hasNext()) { 562 while (rit.hasNext()) {
560 Result resultValue = rit.next(); 563 Result resultValue = rit.next();
561 String tmpKey = resultValue.getString(keyid); 564 if (!initialized){
565 keyPos = resultValue.getResultDescriptor().getColumnIndex(keyid);
566 valuePos = resultValue.getResultDescriptor().getColumnIndex(valueid);
567 if (valuePos < 0){
568 valuePos = 1;
569 }
570 initialized = true;
571 }
572 String tmpKey = resultValue.getString(keyPos);
562 // TODO: HACK da die ARCSDE kein DISTINCT auf räumlichen Anfragen unterstützt. 573 // TODO: HACK da die ARCSDE kein DISTINCT auf räumlichen Anfragen unterstützt.
563 if (previousKey == null || !tmpKey.equals(previousKey)){ 574 if (previousKey == null || !tmpKey.equals(previousKey)){
564 previousKey = tmpKey; 575 previousKey = tmpKey;
565 keyValueDescibeData.add(new DefaultKeyValueDescribeData(tmpKey, resultValue.getString(valueid))); 576 keyValueDescibeData.add(new DefaultKeyValueDescribeData(tmpKey, resultValue.getString(valuePos)));
566 } 577 }
567 } 578 }
568 return keyValueDescibeData; 579 return keyValueDescibeData;
569 } 580 }
570 581

http://dive4elements.wald.intevation.org