# HG changeset patch # User Ingo Weinzierl # Date 1317218460 0 # Node ID 91d038c7aae5da212839ddd96b89ea6d645629bc # Parent 94732906b094d0fdef2762fdf02b4735543486b4 Bugfix: #328 Improved datacage configuration and labels for selected waterlevels. flys-artifacts/trunk@2854 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 94732906b094 -r 91d038c7aae5 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Wed Sep 28 09:17:20 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Sep 28 14:01:00 2011 +0000 @@ -1,3 +1,18 @@ +2011-09-28 Ingo Weinzierl + + flys/issue328 (W-INFO / ÜSK: Auswahl der Wasserspiegellage / Auswahlunterstützung) + + * doc/conf/meta-data.xml: Added an out 'waterlevels' that might be used to + fetch user specific waterlevels (same as longitudinal sections, but + without Q facet). + In addition, the system specific datacage stuff is now fetched, when: + a) no user-id is given + b) a user-id is given and there is a parameter 'load-system' + + * src/main/java/de/intevation/flys/artifacts/states/WaterlevelSelectState.java: + If the label of the WQKms object specified by the waterlevel selection + begins with a "Q", the label is wrapped into a "W()", e.g. "W(Q=1200)". + 2011-09-28 Ingo Weinzierl * src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Made diff -r 94732906b094 -r 91d038c7aae5 flys-artifacts/doc/conf/meta-data.xml --- a/flys-artifacts/doc/conf/meta-data.xml Wed Sep 28 09:17:20 2011 +0000 +++ b/flys-artifacts/doc/conf/meta-data.xml Wed Sep 28 14:01:00 2011 +0000 @@ -306,7 +306,7 @@ - SELECT u.id AS user_id, c.id AS collection_id + SELECT u.id AS user_id, c.id AS collection_id, c.name as collection_name FROM collections c JOIN users u ON c.user_id = u.id WHERE u.gid = CAST(${user-id} AS uuid) ORDER BY c.creation DESC @@ -321,6 +321,12 @@ + + + + Import longitudinal sections only if the ${artifact-out} is defined as 'longitudinal_section' + --------------------------------------------------------------------------------------------- + SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' @@ -346,21 +352,67 @@ + + Import of longitudinal sections finished + + + + + Import Waterlevels only if the ${artifact-out} is defined as 'waterlevels' + -------------------------------------------------------------------------- + + + + SELECT id AS out_id FROM outs WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' + + + + SELECT name AS facet_name, num as facet_num, description AS facet_description + FROM facets WHERE out_id = ${out_id} and name = 'longitudinal_section.w' ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + Import of waterlevels finished + + + + - System specific part - -------------------- + Include System specific part when 'load-system' is in parameters. + ----------------------------------------------------------------- - + + + + + + + - System specific part only - ------------------------- + Include System specific part only if no user ID is given. + --------------------------------------------------------- diff -r 94732906b094 -r 91d038c7aae5 flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelSelectState.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelSelectState.java Wed Sep 28 09:17:20 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelSelectState.java Wed Sep 28 14:01:00 2011 +0000 @@ -129,7 +129,13 @@ } catch (NumberFormatException nfe) { /* do nothing */ } - return new String[] { wqkms[idx].getName() }; + String name = wqkms[idx].getName(); + + if (name != null && name.indexOf("Q") >= 0) { + name = "W(" + name + ")"; + } + + return new String[] { name }; }