[PATCH 2 of 2] issue1345: Fix sediment load facet type, adjust theme name
Wald Commits
scm-commit at wald.intevation.org
Mon Oct 14 17:31:23 CEST 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1381765279 -7200
# Node ID 24023630f693ddc653e1fbc662bb5e2de062e9e2
# Parent 80c14a7e35f32911e2c3c39e720a7e1a7f042b8d
issue1345: Fix sediment load facet type, adjust theme name.
diff -r 80c14a7e35f3 -r 24023630f693 artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentYieldArtifact.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentYieldArtifact.java Mon Oct 14 17:40:31 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/SedimentYieldArtifact.java Mon Oct 14 17:41:19 2013 +0200
@@ -151,15 +151,38 @@
Date[] dates = SedimentLoadFactory.getSedimentYieldTimes(Integer.valueOf(code));
Calendar date = Calendar.getInstance();
date.setTime(dates[0]);
- String name = fractionName + " " + date.get(Calendar.YEAR);
+ String name = fractionName + " - " + date.get(Calendar.YEAR);
if (dates[1] != null) {
date.setTime(dates[1]);
name += " - " + date.get(Calendar.YEAR);
}
+ String facetType = "";
+ if (fraction.equals("coarse")) {
+ facetType = SEDIMENT_LOAD_COARSE;
+ }
+ else if (fraction.equals("sand")) {
+ facetType = SEDIMENT_LOAD_SAND;
+ }
+ else if (fraction.equals("fine_middle")) {
+ facetType = SEDIMENT_LOAD_FINEMIDDLE;
+ }
+ else if (fraction.equals("susp_sand")) {
+ facetType = SEDIMENT_LOAD_SUSP_SAND;
+ }
+ else if (fraction.equals("susp_sand_bed")) {
+ facetType = SEDIMENT_LOAD_SUSP_SAND_BED;
+ }
+ else if (fraction.equals("suspended_sediment")) {
+ facetType = SEDIMENT_LOAD_SUSP_SEDIMENT;
+ }
+ else {
+ logger.error("Do not know fraction type " + fraction);
+ }
+
Facet facet = new SedimentLoadFacet(
0,
- SEDIMENT_LOAD_COARSE,
+ facetType,
name,
//????
ComputeType.ADVANCE, state.getID(), "hash"
More information about the Dive4elements-commits
mailing list