# HG changeset patch # User Sascha L. Teichmann # Date 1364563536 -3600 # Node ID 35dba807966ae18156e41fce95eb79da97363a8e # Parent eeac800eb4cd312cb73653c6ac9cc5a111dc67c1 Applied contrib/inline-dc-attribute.xsl und fix idention. Need testing diff -r eeac800eb4cd -r 35dba807966a flys-artifacts/doc/conf/meta-data.xml --- a/flys-artifacts/doc/conf/meta-data.xml Fri Mar 29 11:07:24 2013 +0100 +++ b/flys-artifacts/doc/conf/meta-data.xml Fri Mar 29 14:25:36 2013 +0100 @@ -1,4 +1,4 @@ - + @@ -36,7 +36,7 @@ COALESCE(ld_from, '') AS ldf, COALESCE(ld_to, '') AS ldt FROM master_artifacts_range - WHERE gid = CAST(${artifact-id} as uuid) + WHERE gid = CAST(${artifact-id} AS uuid) @@ -59,7 +59,7 @@ - SELECT id AS river_id, name as river_name FROM rivers + SELECT id AS river_id, name AS river_name FROM rivers WHERE lower(name) LIKE lower(${river}) @@ -78,17 +78,14 @@ FROM wsts WHERE kind = 0 AND river_id = ${river_id} - - + - - - - - - + @@ -109,17 +106,14 @@ FROM wsts WHERE kind = 0 AND river_id = ${river_id} - - + - - - - - - + @@ -140,20 +134,16 @@ FROM wsts WHERE kind = 1 AND river_id = ${river_id} - - + - - - - - - + - - + @@ -171,17 +161,14 @@ FROM wsts WHERE kind = 1 AND river_id = ${river_id} - - + - - - - - - + @@ -202,17 +189,14 @@ FROM wsts WHERE kind = 1 AND river_id = ${river_id} - - + - - - - - - + @@ -232,18 +216,14 @@ FROM wsts WHERE kind = 2 AND river_id = ${river_id} - - - - + + - - - - - - + @@ -263,17 +243,14 @@ FROM wsts WHERE kind = 2 AND river_id = ${river_id} - - + - - - - - - + @@ -293,17 +270,14 @@ FROM wsts WHERE kind = 2 AND river_id = ${river_id} - - + - - - - - - + @@ -323,17 +297,14 @@ FROM wsts WHERE kind = 2 AND river_id = ${river_id} - - + - - - - - - + @@ -354,17 +325,14 @@ FROM wsts WHERE kind = 3 AND river_id = ${river_id} - - + - - - - - - + @@ -384,17 +352,14 @@ FROM wsts WHERE kind = 4 AND river_id = ${river_id} - - + - - - - - - + @@ -414,17 +379,14 @@ FROM wsts WHERE kind = 4 AND river_id = ${river_id} - - + - - - - - - + @@ -444,17 +406,13 @@ FROM wsts WHERE kind = 4 AND river_id = ${river_id} - - - + - - - - - - + @@ -466,8 +424,7 @@ - - + SELECT id AS prot_id, @@ -475,34 +432,29 @@ FROM wsts WHERE kind = 5 AND river_id = ${river_id} - - - - - + + - - - - - - + - - + - - + SELECT id AS prot_id, @@ -510,19 +462,16 @@ FROM wsts WHERE kind = 5 AND river_id = ${river_id} - - - - + - - - - - - + @@ -533,53 +482,32 @@ - - - - - - - - - - - - + + + - - - - + - - - - + - - - - - + SELECT id AS anno_id, name AS anno_description FROM annotation_types - - - - - + @@ -587,8 +515,7 @@ - - + SELECT DISTINCT @@ -600,11 +527,9 @@ AND csl.km BETWEEN ${fromkm} AND ${tokm} - - - - - + @@ -613,8 +538,7 @@ - - + SELECT DISTINCT @@ -626,51 +550,43 @@ AND he.km BETWEEN ${fromkm} AND ${tokm} - - - - - + - - + - + SELECT id AS fvmid, description AS fvmd FROM flow_velocity_measurements WHERE river_id = ${river_id} - - - - + - - SELECT id, description, station, datetime, v, w, q - FROM flow_velocity_measure_values - WHERE measurements_id = ${fvmid} - AND station BETWEEN ${fromkm} AND ${tokm} - - - - - - - - + + SELECT id, description, station, datetime, v, w, q + FROM flow_velocity_measure_values + WHERE measurements_id = ${fvmid} + AND station BETWEEN ${fromkm} AND ${tokm} + + + + - - - - + + + + @@ -683,11 +599,9 @@ FROM bed_height_single WHERE river_id = ${river_id} - - - - - + @@ -824,7 +738,6 @@ - @@ -843,28 +756,31 @@ - - - + + + - - - - - SELECT id AS gauge_id, - name AS gauge_name - FROM gauges WHERE river_id = ${river_id} - - - - - - - - - - + + + + + SELECT id AS gauge_id, + name AS gauge_name + FROM gauges WHERE river_id = ${river_id} + + + + - - - - - + --> + + + + + @@ -914,729 +830,667 @@ - - - - - SELECT id AS gauge_id, - name AS gauge_name - FROM gauges WHERE river_id = ${river_id} - - - - - - - - - - - - - - + + + + + SELECT id AS gauge_id, + name AS gauge_name + FROM gauges WHERE river_id = ${river_id} + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - - - - - + - - - FIXME: Following two macros look identical to me. - - - - - - - - - - - - - - - - - - - SELECT d.id AS dem_id, - r.a AS dem_lower, - r.b AS dem_upper, - d.name AS name, - d.projection || ' | ' || t.start_time || ' - ' || t.stop_time AS info - FROM dem d - JOIN ranges r ON d.range_id = r.id - JOIN time_intervals t ON d.time_interval_id = t.id - WHERE d.river_id = ${river_id} - - - - - - - - - - - - - - - - SELECT DISTINCT - name AS hws_name, - official AS hws_official, - kind_id AS hws_kind - FROM hws_lines - WHERE river_id = ${river_id} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT DISTINCT - name AS hws_points_name, - official AS hws_points_official, - kind_id AS hws_points_kind - FROM hws_points - WHERE river_id = ${river_id} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT count(*) as km_exists - FROM river_axes_km WHERE river_id = ${river_id} - - - - - - - - - - - - - - Grab only the actual first - - SELECT DISTINCT - cs.kind_id as kind_id, - ck.name as kind_name - FROM cross_section_tracks cs - JOIN cross_section_track_kinds ck on cs.kind_id = ck.id - WHERE river_id = ${river_id} - AND kind_id=1 - - - - - - - - - - - - - Now the other tracks - - SELECT DISTINCT - cs.kind_id as kind_id, - ck.name as kind_name, - cs.name as layer_name - FROM cross_section_tracks cs - JOIN cross_section_track_kinds ck on cs.kind_id = ck.id - WHERE river_id = ${river_id} - AND kind_id=0 - - - - - - - - - - - - - - - - - - SELECT DISTINCT - ax.kind_id as kind_id, - ak.name as kind_name - FROM river_axes ax - JOIN axis_kinds ak on ax.kind_id = ak.id - WHERE river_id = ${river_id} - AND kind_id=1 - - - - - - - - - - + + + + + + + + + + FIXME: Following two macros look identical to me. + + + + + + + + + + + - SELECT DISTINCT - ak.name as kind_name, - ax.kind_id as kind_id, - ax.name as layer_name - FROM river_axes ax - JOIN axis_kinds ak on ax.kind_id = ak.id - WHERE river_id = ${river_id} - AND kind_id <> 1 - - - - - - - - - - - - - - - - - SELECT DISTINCT - name - FROM hydr_boundaries - WHERE river_id = ${river_id} - AND kind = 2 + SELECT d.id AS dem_id, + r.a AS dem_lower, + r.b AS dem_upper, + d.name AS name, + d.projection || ' | ' || t.start_time || ' - ' || t.stop_time AS info + FROM dem d + JOIN ranges r ON d.range_id = r.id + JOIN time_intervals t ON d.time_interval_id = t.id + WHERE d.river_id = ${river_id} - - - - - - SELECT DISTINCT - name - FROM hydr_boundaries_poly - WHERE river_id = ${river_id} - AND kind = 2 - - - + - - - - - SELECT DISTINCT - name - FROM hydr_boundaries - WHERE river_id = ${river_id} - AND kind = 1 - - What about all other line kinds? - - - - + + + + + + + SELECT DISTINCT + name AS hws_name, + official AS hws_official, + kind_id AS hws_kind + FROM hws_lines + WHERE river_id = ${river_id} + + + + + + - - - - - - - - SELECT DISTINCT - b.sectie AS sectie_id, - sk.name AS sectie - FROM hydr_boundaries_poly b - JOIN sectie_kinds sk ON b.sectie = sk.id - WHERE b.river_id = ${river_id} - AND b.kind = 1 - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT DISTINCT + name AS hws_points_name, + official AS hws_points_official, + kind_id AS hws_points_kind + FROM hws_points + WHERE river_id = ${river_id} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT count(*) AS km_exists + FROM river_axes_km WHERE river_id = ${river_id} + + + + - - - - SELECT DISTINCT - b.sobek AS sobek_id, - sk.name AS sobek - FROM hydr_boundaries_poly b - JOIN sobek_kinds sk ON b.sobek = sk.id - WHERE b.river_id = ${river_id} - AND b.kind = 1 - - - - - - - - - - - - - - - - - - - - - - - - - SELECT DISTINCT - fp.kind_id as kind_id, - flk.name as kind_name - FROM floodplain fp - JOIN floodplain_kinds flk on fp.kind_id = flk.id - WHERE river_id = ${river_id} - AND kind_id=1 - - + + + + + + + Grab only the actual first + + SELECT DISTINCT + cs.kind_id AS kind_id, + ck.name AS kind_name + FROM cross_section_tracks cs + JOIN cross_section_track_kinds ck on cs.kind_id = ck.id + WHERE river_id = ${river_id} + AND kind_id=1 + + + + + + + + + Now the other tracks + + SELECT DISTINCT + cs.kind_id AS kind_id, + ck.name AS kind_name, + cs.name AS layer_name + FROM cross_section_tracks cs + JOIN cross_section_track_kinds ck on cs.kind_id = ck.id + WHERE river_id = ${river_id} + AND kind_id=0 + + + + + + + + + + + + + + + SELECT DISTINCT + ax.kind_id AS kind_id, + ak.name AS kind_name + FROM river_axes ax + JOIN axis_kinds ak on ax.kind_id = ak.id + WHERE river_id = ${river_id} + AND kind_id=1 + + + + + + + + + + SELECT DISTINCT + ak.name AS kind_name, + ax.kind_id AS kind_id, + ax.name AS layer_name + FROM river_axes ax + JOIN axis_kinds ak on ax.kind_id = ak.id + WHERE river_id = ${river_id} + AND kind_id <> 1 + + + + + + + + + + + + + + + SELECT DISTINCT + name + FROM hydr_boundaries + WHERE river_id = ${river_id} + AND kind = 2 + + + + + + + + SELECT DISTINCT + name + FROM hydr_boundaries_poly + WHERE river_id = ${river_id} + AND kind = 2 + + + + + + + + + + + SELECT DISTINCT + name + FROM hydr_boundaries + WHERE river_id = ${river_id} + AND kind = 1 + + What about all other line kinds? + + + + + + + + + + + + + + SELECT DISTINCT + b.sectie AS sectie_id, + sk.name AS sectie + FROM hydr_boundaries_poly b + JOIN sectie_kinds sk ON b.sectie = sk.id + WHERE b.river_id = ${river_id} + AND b.kind = 1 + + + + + + + + + + + + SELECT DISTINCT + b.sobek AS sobek_id, + sk.name AS sobek + FROM hydr_boundaries_poly b + JOIN sobek_kinds sk ON b.sobek = sk.id + WHERE b.river_id = ${river_id} + AND b.kind = 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT DISTINCT + fp.kind_id AS kind_id, + flk.name AS kind_name + FROM floodplain fp + JOIN floodplain_kinds flk on fp.kind_id = flk.id + WHERE river_id = ${river_id} + AND kind_id=1 + + + + + + + + + + SELECT DISTINCT + flk.name AS kind_name, + fp.kind_id AS kind_id, + fp.name AS layer_name + FROM floodplain fp + JOIN floodplain_kinds flk on fp.kind_id = flk.id + WHERE river_id = ${river_id} + AND kind_id <> 1 + + + + description="{$layer_name}" + ids="{$river_id};{$layer_name};{$kind_id}"/> - - - - - SELECT DISTINCT - flk.name as kind_name, - fp.kind_id as kind_id, - fp.name as layer_name - FROM floodplain fp - JOIN floodplain_kinds flk on fp.kind_id = flk.id - WHERE river_id = ${river_id} - AND kind_id <> 1 - - - - - - - - - - - - - - Call from a context where fed_name hws_kind hws_name and river_id is - availble - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - SELECT DISTINCT - fs.name AS fed_name, - fs.id AS fed_id - FROM hws_lines hws - JOIN fed_states fs ON hws.fed_state_id = fs.id - WHERE river_id = ${river_id} - AND hws.official=1 - - - - - SELECT DISTINCT - name AS hws_name, - kind_id AS hws_kind - FROM hws_lines - WHERE river_id = ${river_id} - AND official=1 - AND fed_state_id = ${fed_id} ORDER BY name - - - - - - - - - - - SELECT distinct - name AS hws_name, - kind_id AS hws_kind - FROM hws_lines - WHERE river_id = ${river_id} - AND official=1 - AND fed_state_id IS NULL - ORDER BY name - - - - - - - - - - SELECT DISTINCT - fs.name AS fed_name, - fs.id AS fed_id - FROM hws_lines hws - JOIN fed_states fs ON hws.fed_state_id = fs.id - WHERE river_id = ${river_id} - AND hws.official=0 - - - - - SELECT DISTINCT - name AS hws_name, - kind_id AS hws_kind - FROM hws_lines - WHERE river_id = ${river_id} - AND official=0 - AND fed_state_id = ${fed_id} ORDER BY name - - - - - - - - - - - SELECT distinct - name AS hws_name, - kind_id AS hws_kind - FROM hws_lines - WHERE river_id = ${river_id} - AND official=0 - AND fed_state_id IS NULL ORDER BY name - - - - - - + + + Call from a context where fed_name hws_kind hws_name and river_id is + availble + + + + + + + + + + + + + + + + + + + + + + + + SELECT DISTINCT + fs.name AS fed_name, + fs.id AS fed_id + FROM hws_lines hws + JOIN fed_states fs ON hws.fed_state_id = fs.id + WHERE river_id = ${river_id} + AND hws.official=1 + + + + + SELECT DISTINCT + name AS hws_name, + kind_id AS hws_kind + FROM hws_lines + WHERE river_id = ${river_id} + AND official=1 + AND fed_state_id = ${fed_id} ORDER BY name + + + + + + + + + + SELECT distinct + name AS hws_name, + kind_id AS hws_kind + FROM hws_lines + WHERE river_id = ${river_id} + AND official=1 + AND fed_state_id IS NULL + ORDER BY name + + + + + + + + + + SELECT DISTINCT + fs.name AS fed_name, + fs.id AS fed_id + FROM hws_lines hws + JOIN fed_states fs ON hws.fed_state_id = fs.id + WHERE river_id = ${river_id} + AND hws.official=0 + + + + + SELECT DISTINCT + name AS hws_name, + kind_id AS hws_kind + FROM hws_lines + WHERE river_id = ${river_id} + AND official=0 + AND fed_state_id = ${fed_id} ORDER BY name + + + + + + + + + + SELECT distinct + name AS hws_name, + kind_id AS hws_kind + FROM hws_lines + WHERE river_id = ${river_id} + AND official=0 + AND fed_state_id IS NULL ORDER BY name + + + + + + - - - Call from a context where fed_name hws_kind hws_name and river_id is - availble - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Call from a context where fed_name hws_kind hws_name and river_id is + availble + + + + + + + + + + + + + + + + + - - - - - - SELECT DISTINCT - fs.name AS fed_name, - fs.id AS fed_id - FROM hws_points hws - JOIN fed_states fs ON hws.fed_state_id = fs.id - WHERE river_id = ${river_id} - AND hws.official=1 - - - - - SELECT DISTINCT - name AS hws_name, - kind_id AS hws_kind - FROM hws_points - WHERE river_id = ${river_id} - AND official=1 - AND fed_state_id = ${fed_id} ORDER BY name - - - - - - - - - - - SELECT distinct - name AS hws_name, - kind_id AS hws_kind - FROM hws_points - WHERE river_id = ${river_id} - AND official=1 - AND fed_state_id IS NULL - ORDER BY name - - - - - - - - - - SELECT DISTINCT - fs.name AS fed_name, - fs.id AS fed_id - FROM hws_points hws - JOIN fed_states fs ON hws.fed_state_id = fs.id - WHERE river_id = ${river_id} - AND hws.official=0 - - - - - SELECT DISTINCT - name AS hws_name, - kind_id AS hws_kind - FROM hws_points - WHERE river_id = ${river_id} - AND official=0 - AND fed_state_id = ${fed_id} ORDER BY name - - - - - - - - - - - SELECT distinct - name AS hws_name, - kind_id AS hws_kind - FROM hws_points - WHERE river_id = ${river_id} - AND official=0 - AND fed_state_id IS NULL ORDER BY name - - - - - - + + + + + + SELECT DISTINCT + fs.name AS fed_name, + fs.id AS fed_id + FROM hws_points hws + JOIN fed_states fs ON hws.fed_state_id = fs.id + WHERE river_id = ${river_id} + AND hws.official=1 + + + + + SELECT DISTINCT + name AS hws_name, + kind_id AS hws_kind + FROM hws_points + WHERE river_id = ${river_id} + AND official=1 + AND fed_state_id = ${fed_id} ORDER BY name + + + + + + + + + + SELECT distinct + name AS hws_name, + kind_id AS hws_kind + FROM hws_points + WHERE river_id = ${river_id} + AND official=1 + AND fed_state_id IS NULL + ORDER BY name + + + + + + + + + + SELECT DISTINCT + fs.name AS fed_name, + fs.id AS fed_id + FROM hws_points hws + JOIN fed_states fs ON hws.fed_state_id = fs.id + WHERE river_id = ${river_id} + AND hws.official=0 + + + + + SELECT DISTINCT + name AS hws_name, + kind_id AS hws_kind + FROM hws_points + WHERE river_id = ${river_id} + AND official=0 + AND fed_state_id = ${fed_id} ORDER BY name + + + + + + + + + + SELECT distinct + name AS hws_name, + kind_id AS hws_kind + FROM hws_points + WHERE river_id = ${river_id} + AND official=0 + AND fed_state_id IS NULL ORDER BY name + + + + + + @@ -1652,11 +1506,9 @@ AND b.kind_id <> 0 - - - - - + @@ -1674,11 +1526,9 @@ - - - - - + @@ -1695,169 +1545,159 @@ - - - - - + - - - - SELECT count(*) as km_exists, name as name - FROM fixpoints WHERE river_id = ${river_id} GROUP BY name - - - - - - - - - - - - - - - - - - - - - - - - SELECT count(*) as uesg_exist, name as name - FROM floodmaps - WHERE river_id = ${river_id} AND kind = 111 - GROUP BY name, kind - - - - - - - - - - - - - - - - SELECT count(*) as uesg_exist, name as name - FROM floodmaps - WHERE river_id = ${river_id} AND kind = 112 - GROUP BY name, kind - - - - - - - - - - - - - - - - - - SELECT count(*) as uesg_exist, name as name - FROM floodmaps - WHERE river_id = ${river_id} AND kind = 121 - GROUP BY name, kind - - - - - - - - - - - - - - - - SELECT count(*) as uesg_exist, name as name - FROM floodmaps - WHERE river_id = ${river_id} AND kind = 122 - GROUP BY name, kind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + SELECT count(*) AS km_exists, name AS name + FROM fixpoints WHERE river_id = ${river_id} GROUP BY name + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + SELECT count(*) AS uesg_exist, name AS name + FROM floodmaps + WHERE river_id = ${river_id} AND kind = 111 + GROUP BY name, kind + + + + + + + + + + + + SELECT count(*) AS uesg_exist, name AS name + FROM floodmaps + WHERE river_id = ${river_id} AND kind = 112 + GROUP BY name, kind + + + + + + + + + + + + + + SELECT count(*) AS uesg_exist, name AS name + FROM floodmaps + WHERE river_id = ${river_id} AND kind = 121 + GROUP BY name, kind + + + + + + + + + + + + SELECT count(*) AS uesg_exist, name AS name + FROM floodmaps + WHERE river_id = ${river_id} AND kind = 122 + GROUP BY name, kind + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1872,25 +1712,25 @@ + - SELECT id AS bedh_id, - year AS bedh_year, - description AS bedh_descr - FROM bed_height_single WHERE river_id = ${river_id} + SELECT id AS bedh_id, + year AS bedh_year, + description AS bedh_descr + FROM bed_height_single WHERE river_id = ${river_id} - - - - - + + @@ -1901,15 +1741,14 @@ FROM bed_height_epoch WHERE river_id = ${river_id} - - - - - + + @@ -1921,76 +1760,73 @@ - - - - - - - Get the user and 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 - - + - - - SELECT m.id AS a_id, - m.state AS a_state, - m.gid AS a_gid, - m.creation AS a_creation, - COALESCE(ld_mode, '') AS ld_m, - COALESCE(ld_locations, '') AS ld_l, - COALESCE(ld_from, '') AS ld_f, - COALESCE(ld_to, '') AS ld_t - FROM master_artifacts_range m - WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) - AND EXISTS ( - SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) - - - - - - - - - - - - - - - - - - SELECT m.id AS a_id, - m.state AS a_state, - m.gid AS a_gid, - m.creation AS a_creation, - ardg.v AS gaugy, - arv.v AS wqsingle - FROM master_artifacts m, - artifact_data ardg, - artifact_data arv - WHERE m.collection_id = ${collection_id} - AND m.gid = CAST(${artifact-id} AS uuid) - AND ardg.artifact_id = m.id - AND ardg.k = 'ld_gaugename' - AND arv.artifact_id = m.id - AND arv.k = 'wq_single' - AND EXISTS ( - SELECT id - FROM artifact_data ad - WHERE ad.artifact_id = m.id - AND k = 'river' - AND v = ${river}) - - + + + + Get the user and 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 + + + + + SELECT m.id AS a_id, + m.state AS a_state, + m.gid AS a_gid, + m.creation AS a_creation, + COALESCE(ld_mode, '') AS ld_m, + COALESCE(ld_locations, '') AS ld_l, + COALESCE(ld_from, '') AS ld_f, + COALESCE(ld_to, '') AS ld_t + FROM master_artifacts_range m + WHERE m.collection_id = ${collection_id} AND m.gid <> CAST(${artifact-id} AS uuid) + AND EXISTS ( + SELECT id FROM artifact_data ad WHERE ad.artifact_id = m.id AND k = 'river' AND v = ${river}) + + + + + + + + + + + + + + + + + + SELECT m.id AS a_id, + m.state AS a_state, + m.gid AS a_gid, + m.creation AS a_creation, + ardg.v AS gaugy, + arv.v AS wqsingle + FROM master_artifacts m, + artifact_data ardg, + artifact_data arv + WHERE m.collection_id = ${collection_id} + AND m.gid = CAST(${artifact-id} AS uuid) + AND ardg.artifact_id = m.id + AND ardg.k = 'ld_gaugename' + AND arv.artifact_id = m.id + AND arv.k = 'wq_single' + AND EXISTS ( + SELECT id + FROM artifact_data ad + WHERE ad.artifact_id = m.id + AND k = 'river' + AND v = ${river}) + + SELECT ol.wst_id AS wstid, ol.wst_column_pos AS wstcolpos, ol.name AS olname, ol.value AS oval @@ -2005,634 +1841,660 @@ - - - - - - + + + + + + - - SHOW W-DIFFERENCES - + + SHOW W-DIFFERENCES + - - - - - + + + + + - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a + SELECT a.gid AS aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a WHERE f.name = 'w_differences' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} - + - - + + - - - - + + + + - - SHOW REFERENCE CURVE - - + + SHOW REFERENCE CURVE + - - - - - + + + + + - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a + SELECT a.gid AS aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a WHERE f.name = 'reference_curve' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} - + - - + + - - - - - + + + + + - - SHOW COMPUTED DISCHARGE CURVES - + + SHOW COMPUTED DISCHARGE CURVES + - - - - - + + + + + - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a + SELECT a.gid AS aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a WHERE f.name = 'computed_discharge_curve.q' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} - + - - + + - - - - - - - CROSS SECTION - - - - - - - - - - - SELECT id AS out_id - FROM outs - WHERE artifact_id = ${a_id} AND name = 'cross_section' - - - - - SELECT name AS facet_name, num as facet_num, description AS facet_description - FROM facets - WHERE out_id = ${out_id} - ORDER BY num ASC, name DESC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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} - ORDER BY num ASC, name DESC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT id AS out_id - FROM outs - WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' - - - - - - SELECT name AS facet_name, num as facet_num, description AS facet_description - FROM facets - WHERE out_id = ${out_id} AND ( name LIKE 'fix_deviation_ls%' OR name LIKE 'fix_sector_average_ls%' OR name LIKE 'fix_analysis_events_ls%' OR name LIKE 'fix_reference_events_ls%' ) - ORDER BY num ASC, name DESC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - SELECT id AS out_id - FROM outs - WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' - - - - - SELECT name AS facet_name, num as facet_num, description AS facet_description - FROM facets - WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_dwt%' OR name LIKE 'fix_deviation_dwt%' OR name = 'fix_analysis_events_dwt' OR name = 'fix_reference_events_dwt' OR name = 'fix_analysis_periods_dwt' ) - ORDER BY num ASC, name DESC - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - SELECT id AS out_id - FROM outs - WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' - - - - - SELECT name AS facet_name, num as facet_num, description AS facet_description - FROM facets - WHERE out_id = ${out_id} and name = 'fix_derivate_curve' - ORDER BY num ASC, name DESC - - - - - - - - - - - - - - - - - - - - - - + + CROSS SECTION + - - - - - - - - SELECT id AS out_id - FROM outs - WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' - - - - - SELECT name AS facet_name, num as facet_num, description AS facet_description - FROM facets - WHERE out_id = ${out_id} and ( name LIKE 'fix_sector_average_wq%' OR name = 'fix_wq_curve' OR name LIKE 'fix_analysis_events_wq%' OR name LIKE 'fix_reference_events_wq%' ) - ORDER BY num ASC, name DESC - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a - WHERE (f.name = 'duration_curve.q' or f.name = 'duration_curve.w') and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'cross_section' + + + + + SELECT name AS facet_name, num AS facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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} + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' + + + + + + SELECT name AS facet_name, num AS facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} AND ( + name LIKE 'fix_deviation_ls%' OR + name LIKE 'fix_sector_average_ls%' OR + name LIKE 'fix_analysis_events_ls%' OR + name LIKE 'fix_reference_events_ls%' ) + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'fix_deltawt_curve' + + + + + SELECT name AS facet_name, num AS facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} and ( + name LIKE 'fix_sector_average_dwt%' OR + name LIKE 'fix_deviation_dwt%' OR + name = 'fix_analysis_events_dwt' OR + name = 'fix_reference_events_dwt' OR + name = 'fix_analysis_periods_dwt' ) + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'fix_derivate_curve' + + + + + SELECT name AS facet_name, num AS facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} and name = 'fix_derivate_curve' + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'fix_wq_curve' + + + + + SELECT name AS facet_name, num AS facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} and ( + name LIKE 'fix_sector_average_wq%' OR + name = 'fix_wq_curve' OR + name LIKE 'fix_analysis_events_wq%' OR + name LIKE 'fix_reference_events_wq%' ) + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT a.gid AS aid, + f.id AS fid, + f.name AS facet_name, + f.num AS facet_num, + f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a + WHERE + (f.name = 'duration_curve.q' OR f.name = 'duration_curve.w') AND + f.out_id = o.id AND + o.artifact_id = ${a_id} AND + a.id = ${a_id} - + - - + + - - - - - - - WATERLEVELS - ONLY SHOW Ws - - - + + + + - - - - - - - - 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 - - - - - - - - - - - - - - - - - - - - - + + WATERLEVELS - ONLY SHOW Ws + - - SHOW FLOODMAPS - - + - - - - - + + + + + - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a - WHERE f.name = 'floodmap.wsplgen' and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} + 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 + + + + + + + + + + + + + + + + + + + + + + + SHOW FLOODMAPS + + + + + + + + + + SELECT a.gid AS aid, + f.id AS fid, + f.name AS facet_name, + f.num AS facet_num, + f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a + WHERE f.name = 'floodmap.wsplgen' AND + f.out_id = o.id AND + o.artifact_id = ${a_id} AND + a.id = ${a_id} - + - - + + - - - - - + + + + + - - MINFO bedheight difference - + + MINFO bedheight difference + - - - - - + + + + + - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a - WHERE (f.name = 'fix_sector_average_ls_0' or f.name = 'fix_sector_average_ls_1' or f.name = 'fix_sector_average_ls_2' - or f.name = 'fix_sector_average_ls_3' or f.name = 'fix_analysis_events_ls' or f.name = 'fix_reference_events_ls') - and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} + SELECT a.gid AS aid, + f.id AS fid, + f.name AS facet_name, + f.num AS facet_num, + f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a + WHERE ( + f.name = 'fix_sector_average_ls_0' OR + f.name = 'fix_sector_average_ls_1' OR + f.name = 'fix_sector_average_ls_2' OR + f.name = 'fix_sector_average_ls_3' OR + f.name = 'fix_analysis_events_ls' OR + f.name = 'fix_reference_events_ls' + ) AND f.out_id = o.id AND o.artifact_id = ${a_id} AND a.id = ${a_id} - - - - - - - - - - - - - - - - - - - - - MINFO bedheight middle - - - - - - - - - - SELECT a.gid as aid, f.id AS fid, f.name AS facet_name, f.num AS facet_num, f.description as facet_description - FROM outs as o, facets as f, artifacts as a - WHERE (f.name = 'longitudinal_section.w' or f.name = 'heightmarks_points') - and f.out_id = o.id and o.artifact_id = ${a_id} and a.id = ${a_id} - - - - - - - - - - - - - - - - - - - - - - - - SELECT id AS out_id - FROM outs - WHERE artifact_id = ${a_id} AND name = 'floodmap' - - - - - SELECT name AS facet_name, num as facet_num, description AS facet_description - FROM facets - WHERE out_id = ${out_id} and name = 'floodmap.usershape' - ORDER BY num ASC, name DESC - - + - - - - + + + + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + MINFO bedheight middle + + + + + + + + + + SELECT a.gid AS aid, + f.id AS fid, + f.name AS facet_name, + f.num AS facet_num, + f.description AS facet_description + FROM outs AS o, facets AS f, artifacts AS a + WHERE ( + f.name = 'longitudinal_section.w' OR + f.name = 'heightmarks_points' + ) AND f.out_id = o.id AND o.artifact_id = ${a_id} AND a.id = ${a_id} + + + + + + + + + + + + + + + + + + + + + + + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'floodmap' + + + + + SELECT name AS facet_name, + num AS facet_num, + description AS facet_description + FROM facets + WHERE out_id = ${out_id} AND name = 'floodmap.usershape' + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - Include System specific part when 'load-system' is in parameters. - ----------------------------------------------------------------- - - - - - - + + + Include System specific part when 'load-system' is in parameters. + ----------------------------------------------------------------- + + + - - - Include System specific part only if no user ID is given. - --------------------------------------------------------- - - + + Include System specific part only if no user ID is given. + --------------------------------------------------------- + + +