# HG changeset patch # User "Tom Gottfried " # Date 1408547237 -7200 # Node ID f5c0ed04f67324ac0b1e207f89d7a97083efe640 # Parent 5d5fb6ee1888d933cd5ea193f298cc69f9707754 Reconstruct facet description of sediment load at measurement stations. i18n will follow. diff -r 5d5fb6ee1888 -r f5c0ed04f673 artifacts/doc/conf/meta-data.xml --- a/artifacts/doc/conf/meta-data.xml Wed Aug 20 14:53:29 2014 +0200 +++ b/artifacts/doc/conf/meta-data.xml Wed Aug 20 17:07:17 2014 +0200 @@ -1407,18 +1407,15 @@ - TODO aheinecke: Needs the kind in the ids;2 field - TODO aheinecke: Does seperation by Id even make sense here? Is not a year filter required? + ids="{$syid};{$fraction};{$syear}" /> - TODO aheinecke: Needs the kind in the name @@ -1426,7 +1423,7 @@ factory="sedimentload" target_out="{$out}" info="{$description}" - ids="{$syid};{$station_name} - {$syear}-{$eyear}" /> + ids="{$syid};{$fraction};{$syear}-{$eyear}" /> diff -r 5d5fb6ee1888 -r f5c0ed04f673 artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.java --- 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); }