Mercurial > dive4elements > gnv-client
diff geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/Row.java @ 897:02cd2935b5fa
Removed trailing whitespace.
geo-backend/trunk@1013 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 28 Apr 2010 07:04:19 +0000 |
parents | d674cef2ca0d |
children | ebeb56428409 |
line wrap: on
line diff
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/Row.java Tue Apr 20 12:46:40 2010 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/sde/datasources/Row.java Wed Apr 28 07:04:19 2010 +0000 @@ -49,9 +49,9 @@ int nLength = ArrayStr.length; for (int i=0; i < nLength; i++){ addObject(ArrayStr[i], i); - - } - + + } + } /** @@ -73,7 +73,7 @@ */ public Object getValue(int pPos) throws TechnicalException { if (pPos < mObjects.length) { - + Object o = mObjects[pPos]; if (o instanceof SeShape){ return this.getPosValue(pPos); @@ -100,20 +100,20 @@ try { Calendar lCalendar = (Calendar) getValue(pPos); date = lCalendar.getTime(); - } + } catch (ClassCastException e) { try{ //SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss"); date = DateUtils.getDateFromString ((String)getValue(pPos)); //(Date)formatter.parse((String)getValue(pPos)); - - + + } catch (Exception ex){ sLogger.error(getValue(pPos) + " " + ex.getMessage(), ex); throw new TechnicalException("Could not cast this value to the Date Type. Object is of value type: " + getValue(pPos).getClass().getName()); } - } - + } + return date; } @@ -210,14 +210,14 @@ * @return a strongly typed Float * @throws TechnicalException * @see #getValue(int) - */ + */ public String getPosValue(int pPos)throws TechnicalException{ StringBuffer returnValue = new StringBuffer(); synchronized (returnValue) { try { SeShape val = (SeShape) this.mObjects[pPos]; if (val.isPoint()){ - // Cannot use val.asText() because the + // Cannot use val.asText() because the // generated WKT is invalid. ArrayList aList = val.getAllPoints(0,false); SDEPoint[] mPoint = (SDEPoint[])aList.get(0); @@ -230,7 +230,7 @@ } returnValue.append(")"); }else if (val.isLine() || val.isSimpleLine()){ - // Cannot use val.asText() because the + // Cannot use val.asText() because the // generated WKT is invalid. ArrayList aList = val.getAllPoints(0,false); SDEPoint[] mPoint = (SDEPoint[])aList.get(0); @@ -239,7 +239,7 @@ int nextOffset = length; int[] offsets = (int[])aList.get(1); int offsetPos = 1; - + if(isMultiLineString){ returnValue.append("MULTILINESTRING(("); nextOffset = offsets.length-1 >= offsetPos ? offsets[offsetPos++] : length; @@ -248,12 +248,12 @@ } for (int i = 0; i< length;i++){ - + if (i == nextOffset){ returnValue.append("),("); nextOffset = offsets.length-1 >= offsetPos ? offsets[offsetPos++] : length; } - + returnValue.append(mPoint[i].getX()) .append(" ") .append(mPoint[i].getY()); @@ -270,14 +270,14 @@ }else{ returnValue.append(")"); } - + } else{ returnValue.append(val.asText(val.getTextSize())); } } catch (SeException e) { throw new TechnicalException("Could not cast this value to the " + "Float Type. Object is of value " + - "type: " + + "type: " + getValue(pPos).getClass().getName()); } }