changeset 6726:b68798973da2

Cosmetics, docs.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 31 Jul 2013 11:32:33 +0200
parents 7ea933f9c6ea
children af70e3ab2e83
files artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java
diffstat 1 files changed, 11 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java	Wed Jul 31 11:32:00 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java	Wed Jul 31 11:32:33 2013 +0200
@@ -22,6 +22,7 @@
 import org.dive4elements.river.artifacts.model.minfo.SedimentLoadFactory;
 
 
+/** Service delivering info about sediment loads. */
 public class SedimentLoadInfoService
 extends D4EService
 {
@@ -33,6 +34,10 @@
     public static final String FROM_XPATH = "/art:river/art:location/art:from/text()";
     public static final String TO_XPATH = "/art:river/art:location/art:to/text()";
 
+    /**
+     * Create document with sedimentload infos,
+     * constrained by contents in data.
+     */
     @Override
     protected Document doProcess(
         Document data,
@@ -54,17 +59,18 @@
             data,
             TO_XPATH,
             ArtifactNamespaceContext.INSTANCE);
-        double f, t;
+        double fromD, toD;
         try {
-            f = Double.parseDouble(from);
-            t = Double.parseDouble(to);
+            fromD = Double.parseDouble(from);
+            toD = Double.parseDouble(to);
         }
         catch (NumberFormatException nfe) {
             logger.warn("Invalid locations. Cannot return sediment loads.");
             return XMLUtils.newDocument();
         }
 
-        SedimentLoad[] loads = SedimentLoadFactory.getLoads(river, type, f, t);
+        SedimentLoad[] loads =
+            SedimentLoadFactory.getLoads(river, type, fromD, toD);
         return buildDocument(loads);
     }
 
@@ -98,3 +104,4 @@
         return result;
     }
 }
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org