Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java @ 8113:f5c0ed04f673
Reconstruct facet description of sediment load at measurement stations. i18n will follow.
author | "Tom Gottfried <tom@intevation.de>" |
---|---|
date | Wed, 20 Aug 2014 17:07:17 +0200 |
parents | 4bcc0c8425d2 |
children | ca072278ad02 |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Wed Aug 20 14:53:29 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java Wed Aug 20 17:07:17 2014 +0200 @@ -49,8 +49,6 @@ { private static Logger logger = Logger.getLogger(SedimentLoadFacet.class); - /* Aheinecke we probably need to get the kind and split this up here - * in some way */ private static final String NAME = SEDIMENT_LOAD_TA_STATIC; public SedimentLoadFacet() { @@ -98,17 +96,17 @@ String code = D4EArtifact.getDatacageIDValue(data); String[] split = code.split(";"); String idStr = split[0]; - String desc = ""; - if (split.length >= 2) { - desc = split[1]; - } + + String fraction = split.length >= 2 ? split[1] : ""; + String years = split.length >= 3 ? " - " + split[2] : ""; name = NAME; + description = Resources.getMsg( callMeta, - "facet.sedimentload", - "Sedimentload", - new Object[] { desc }); + "facet.sedimentload." + fraction, + new Object[] { years }); + ((D4EArtifact)artifact).addStringData("load_id", idStr); }