Mercurial > dive4elements > river
changeset 3804:bfaa5578e79d
Picked rev3180 from trunk.
flys-artifacts/tags/pre2.6-2011-11-04@3183 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 08 Nov 2011 12:23:18 +0000 |
parents | 48e9c3a44420 |
children | c35ef7f4b88f |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java |
diffstat | 2 files changed, 33 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Nov 08 12:03:53 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Nov 08 12:23:18 2011 +0000 @@ -1,3 +1,11 @@ +2011-11-08 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Fix flys/issue405 (Datacage: Recommendations get loaded twice). + + * src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java + (setup): Do not try/catch exception. + (spawn_state): Generate just one "general" output. + 2011-11-08 Ingo Weinzierl <ingo@intevation.de> * doc/conf/meta-data.xml: Removed orphaned datacage configuration which is
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Tue Nov 08 12:03:53 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Tue Nov 08 12:23:18 2011 +0000 @@ -86,33 +86,30 @@ String [] parts = code.split("-"); if (parts.length >= 4) { - try { - int col = Integer.valueOf(parts[2]); - int wst = Integer.valueOf(parts[3]); - - addStringData("col_pos", parts[2]); - addStringData("wst_id", parts[3]); - - String wkmsName = WKmsFactory.getWKmsName(col, wst); + int col = Integer.valueOf(parts[2]); + int wst = Integer.valueOf(parts[3]); - String name; - if (parts[0].equals(HEIGHTMARKS_POINTS)) { - name = HEIGHTMARKS_POINTS; - } - else { - name = STATIC_WKMS; - } + addStringData("col_pos", parts[2]); + addStringData("wst_id", parts[3]); - Facet facet = new WKmsFacet( - name, - Resources.getMsg( - callMeta, - wkmsName, - wkmsName)); - fs.add(facet); - facets.put(state.getID(), fs); + String wkmsName = WKmsFactory.getWKmsName(col, wst); + + String name; + if (parts[0].equals(HEIGHTMARKS_POINTS)) { + name = HEIGHTMARKS_POINTS; } - catch (Exception e) {} + else { + name = STATIC_WKMS; + } + + Facet facet = new WKmsFacet( + name, + Resources.getMsg( + callMeta, + wkmsName, + wkmsName)); + fs.add(facet); + facets.put(state.getID(), fs); } } @@ -128,19 +125,13 @@ protected State spawnState() { state = new StaticState(STATIC_STATE_NAME); List<Facet> fs = facets.get(STATIC_STATE_NAME); - DefaultOutput output1 = new DefaultOutput( - "w_differences", - "w_differences.longitudinal_section", "image/png", - fs, - "chart"); - DefaultOutput output2 = new DefaultOutput( - "longitudinal_section", - "longitudinal_section.longitudinal_section", "image/png", + DefaultOutput output = new DefaultOutput( + "general", + "general", "image/png", fs, "chart"); - state.getOutputs().add(output1); - state.getOutputs().add(output2); + state.getOutputs().add(output); return state; }