comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/minfo/SedimentLoadFacet.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 8eb25cbfe242
children eb48b244921d
comparison
equal deleted inserted replaced
8141:37cdfad302cb 8142:d4e4dde1d5cb
85 String code = D4EArtifact.getDatacageIDValue(data); 85 String code = D4EArtifact.getDatacageIDValue(data);
86 String[] split = code.split(";"); 86 String[] split = code.split(";");
87 String idStr = split[0]; 87 String idStr = split[0];
88 88
89 String fraction = split.length >= 2 ? split[1] : ""; 89 String fraction = split.length >= 2 ? split[1] : "";
90 String years = split.length >= 3 ? " - " + split[2] : ""; 90 String years = split.length >= 3 ? split[2] : "";
91 91
92 // Name has the pattern sedimentload.<grainfraction_name> 92 // Name has the pattern sedimentload.<grainfraction_name>
93 name = NAME + "." + fraction; 93 name = NAME + "." + fraction;
94 logger.debug("Created facet: " + name); 94 logger.debug("Created facet: " + name);
95 95
96 description = Resources.getMsg( 96 description = Resources.getMsg(
97 callMeta, 97 callMeta,
98 "facet.sedimentload." + fraction, 98 "facet.sedimentload." + fraction,
99 new Object[] { years }); 99 new Object[] { years, "t/a" });
100 100
101 ((D4EArtifact)artifact).addStringData("load_id", idStr); 101 ((D4EArtifact)artifact).addStringData("load_id", idStr);
102 } 102 }
103 103
104 104

http://dive4elements.wald.intevation.org