diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java @ 8142:d4e4dde1d5cb

With the exception of real calculation results, descriptions of sediment loads can all follow the same pattern.
author Tom Gottfried <tom@intevation.de>
date Tue, 26 Aug 2014 17:16:21 +0200
parents c200b76145ce
children eb48b244921d
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java	Tue Aug 26 12:09:18 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java	Tue Aug 26 17:16:21 2014 +0200
@@ -97,10 +97,7 @@
         String code = D4EArtifact.getDatacageIDValue(data);
         String[] split = code.split(";");
         String idStr = split[0];
-        String desc = "";
-        if (split.length >= 2) {
-            desc = split[1];
-        }
+        String years = split.length >= 2 ? split[1] : "";
 
         int id = Integer.valueOf(idStr);
         SedimentLoadLS theLoad = SedimentLoadLS.getSedimentLoadById(id);
@@ -143,9 +140,9 @@
 
         description = Resources.getMsg(
                 callMeta,
-                "facet.sedimentload.ls." + gfName,
-                "Error: please add l10n for facet.sedimentload.ls." + gfName,
-                new Object[] { desc, i18nUnit });
+                "facet.sedimentload." + gfName,
+                "Error: please add l10n for facet.sedimentload." + gfName,
+                new Object[] { years, i18nUnit });
         ((D4EArtifact)artifact).addStringData("load_id", idStr);
     }
 

http://dive4elements.wald.intevation.org