comparison gnv-artifacts/src/main/java/de/intevation/gnv/chart/VerticalProfileChartFactory.java @ 110:b465f1bbe368

Some Codeimprovments done gnv-artifacts/trunk@159 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 29 Sep 2009 15:02:27 +0000
parents 1b12021905b9
children a16f5267803e
comparison
equal deleted inserted replaced
109:678aad19a08d 110:b465f1bbe368
311 311
312 lEncoder.encode(lImage, outputStream); 312 lEncoder.encode(lImage, outputStream);
313 313
314 } 314 }
315 315
316 private String findValueTitle(Collection<KeyValueDescibeData> values, String pMmtId){ 316 private String findValueTitle(Collection<KeyValueDescibeData> values, String id){
317 int id = 0; 317 if (values != null){
318 try { 318 Iterator<KeyValueDescibeData> it = values.iterator();
319 id = Integer.parseInt(pMmtId); 319 while(it.hasNext()){
320 } catch (NumberFormatException e) { 320 KeyValueDescibeData data = it.next();
321 sLogger.warn(e,e); 321 if (id.equals(data.getKey())){
322 return pMmtId; 322 return data.getValue();
323 }
324 }
323 } 325 }
324 326 return id;
325 Iterator<KeyValueDescibeData> it = values.iterator();
326 while(it.hasNext()){
327 KeyValueDescibeData data = it.next();
328 if (id ==Integer.parseInt(data.getKey())){
329 return data.getValue();
330 }
331 }
332 return "";
333 } 327 }
334 } 328 }

http://dive4elements.wald.intevation.org