[PATCH 2 of 5] Cosmetics, docs
Wald Commits
scm-commit at wald.intevation.org
Wed Jul 31 11:26:37 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1375263153 -7200
# Node ID b68798973da2306dd3f251a3fc33b01204e43d73
# Parent 7ea933f9c6ea842adeb7424a2f3040cfbd1e2c03
Cosmetics, docs.
diff -r 7ea933f9c6ea -r b68798973da2 artifacts/src/main/java/org/dive4elements/river/artifacts/services/SedimentLoadInfoService.java
--- 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 :
More information about the Dive4elements-commits
mailing list