comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadLSFacet.java @ 8222:1cd7225df846

Let official epochs be showy and remove detritus of 'yields' in datacage config.
author Tom Gottfried <tom@intevation.de>
date Mon, 08 Sep 2014 15:54:12 +0200
parents c657ddcf1fa6
children b32c1927f90d
comparison
equal deleted inserted replaced
8221:a0994a326e2a 8222:1cd7225df846
95 log.debug("setup"); 95 log.debug("setup");
96 String code = D4EArtifact.getDatacageIDValue(data); 96 String code = D4EArtifact.getDatacageIDValue(data);
97 String[] split = code.split(";"); 97 String[] split = code.split(";");
98 String idStr = split[0]; 98 String idStr = split[0];
99 String years = split.length >= 2 ? split[1] : ""; 99 String years = split.length >= 2 ? split[1] : "";
100 String kind = split.length >= 3 ? split[2] : "";
100 101
101 int id = Integer.valueOf(idStr); 102 int id = Integer.valueOf(idStr);
102 SedimentLoadLS theLoad = SedimentLoadLS.getSedimentLoadById(id); 103 SedimentLoadLS theLoad = SedimentLoadLS.getSedimentLoadById(id);
103 if (theLoad == null) { 104 if (theLoad == null) {
104 log.error("No load found for id: " + idStr); 105 log.error("No load found for id: " + idStr);
136 log.debug("Created facet: " + name); 137 log.debug("Created facet: " + name);
137 138
138 description = Resources.getMsg( 139 description = Resources.getMsg(
139 callMeta, 140 callMeta,
140 "facet.sedimentload." + gfName, 141 "facet.sedimentload." + gfName,
141 "Error: please add l10n for facet.sedimentload." + gfName,
142 new Object[] { years, i18nUnit }); 142 new Object[] { years, i18nUnit });
143
144 if (kind.equals("official")) {
145 String descPrefix = Resources.getMsg(
146 callMeta,
147 "facet.sedimentload.prefix.offcial");
148 description = descPrefix + description;
149 }
150
143 ((D4EArtifact)artifact).addStringData("load_id", idStr); 151 ((D4EArtifact)artifact).addStringData("load_id", idStr);
144 } 152 }
145 153
146 154
147 /** Copy deeply. */ 155 /** Copy deeply. */

http://dive4elements.wald.intevation.org