# HG changeset patch # User Ingo Weinzierl # Date 1320754998 0 # Node ID bfaa5578e79d7313377ddb35b9d6cda155f33fce # Parent 48e9c3a4442015c3635c1aae5921f85ebe172c85 Picked rev3180 from trunk. flys-artifacts/tags/pre2.6-2011-11-04@3183 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 48e9c3a44420 -r bfaa5578e79d flys-artifacts/ChangeLog --- 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 + + 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 * doc/conf/meta-data.xml: Removed orphaned datacage configuration which is diff -r 48e9c3a44420 -r bfaa5578e79d flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java --- 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 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; }