changeset 7372:495cde925702

Removed obsolete import + whitespace cleanup.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 17 Oct 2013 12:11:09 +0200
parents 6baaa700eada
children 793dfb2f4b7b
files backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java
diffstat 1 files changed, 58 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java	Thu Oct 17 08:29:46 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java	Thu Oct 17 12:11:09 2013 +0200
@@ -8,8 +8,6 @@
 
 package org.dive4elements.river.importer.parsers;
 
-import java.math.BigDecimal;
-
 import java.text.ParseException;
 
 import org.apache.log4j.Logger;
@@ -25,14 +23,12 @@
         Logger.getLogger(BedHeightSingleParser.class);
 
 
-
     @Override
     protected ImportBedHeight newImportBedHeight(String description) {
         return new ImportBedHeightSingle(description);
     }
 
 
-
     /**
      * Create ImportBedHeightSingleValue from a line of csv file, add
      * it to the ImportBedHeight.
@@ -50,7 +46,7 @@
 
         try {
             km = new Double(nf.parse(values[0]).doubleValue());
-	    
+
             Double key = Double.valueOf(km);
 
             if (kmExists.contains(key)) {
@@ -59,8 +55,7 @@
             }
 
             kmExists.add(key);
-	}
-
+        }
         catch (ParseException e) {
             // We expect a lot of ";;;;;;" lines.
             return;
@@ -72,67 +67,66 @@
             return;
         }
 
-	Double height = null;
-	if (values[1].length() > 0) {
-	    try {
-		height = new Double(nf.parse(values[1]).doubleValue());
-	    }
-	    catch (ParseException e) {
-		log.warn("BSP: unparseable height " + values[1]);
-	    }
-	}
-
-	Double uncertainty = null;
-	if (values[2].length() > 0) {
-	    try {
-		uncertainty = new Double(nf.parse(values[2]).doubleValue());
-	    }
-	    catch (ParseException e) {
-		log.warn("BSP: unparseable uncertainty value " + values[2]);
-	    }
-	}
-
-	Double dataGap = null;
-	if (values[3].length() > 0) {
-	    try {
-		dataGap = new Double(nf.parse(values[3]).doubleValue());
-	    }
-	    catch (ParseException e) {
-		log.warn("BSP: unparseable data gap " + values[3]);
-	    }
-	}
+        Double height = null;
+        if (values[1].length() > 0) {
+            try {
+                height = new Double(nf.parse(values[1]).doubleValue());
+            }
+            catch (ParseException e) {
+                log.warn("BSP: unparseable height " + values[1]);
+            }
+        }
 
-	Double soundingWidth = null;
-	if (values[4].length() > 0) {
-	    try {
-		soundingWidth = new Double(nf.parse(values[4]).doubleValue());
-	    }
-	    catch (ParseException e) {
-		log.warn("BSP: unparseable sounding width " + values[4]);
-	    }
-	}
+        Double uncertainty = null;
+        if (values[2].length() > 0) {
+            try {
+                uncertainty = new Double(nf.parse(values[2]).doubleValue());
+            }
+            catch (ParseException e) {
+                log.warn("BSP: unparseable uncertainty value " + values[2]);
+            }
+        }
 
-	Double width = null;
-	if (values[5].length() > 0) {
-	    try {
-		width = new Double(nf.parse(values[5]).doubleValue());
-	    }
-	    catch (ParseException e) {
-		log.warn("BSP: unparseable width " + values[5]);
-	    }
-	}
+        Double dataGap = null;
+        if (values[3].length() > 0) {
+            try {
+                dataGap = new Double(nf.parse(values[3]).doubleValue());
+            }
+            catch (ParseException e) {
+                log.warn("BSP: unparseable data gap " + values[3]);
+            }
+        }
 
-	ImportBedHeightSingleValue value = new ImportBedHeightSingleValue(
-	    (ImportBedHeightSingle) obj,
-	    km,
-	    height,
-	    uncertainty,
-	    dataGap,
-	    soundingWidth,
-	    width
-	);
+        Double soundingWidth = null;
+        if (values[4].length() > 0) {
+            try {
+                soundingWidth = new Double(nf.parse(values[4]).doubleValue());
+            }
+            catch (ParseException e) {
+                log.warn("BSP: unparseable sounding width " + values[4]);
+            }
+        }
 
-	obj.addValue(value);
+        Double width = null;
+        if (values[5].length() > 0) {
+            try {
+                width = new Double(nf.parse(values[5]).doubleValue());
+            }
+            catch (ParseException e) {
+                log.warn("BSP: unparseable width " + values[5]);
+            }
+        }
+
+        ImportBedHeightSingleValue value = new ImportBedHeightSingleValue(
+            (ImportBedHeightSingle) obj,
+            km,
+            height,
+            uncertainty,
+            dataGap,
+            soundingWidth,
+            width);
+
+        obj.addValue(value);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org