view flys-artifacts/src/main/resources/metadata/template.xml @ 704:eab5e5089d77

Merged revisions 2127-2133,2136-2137,2140,2143-2144,2146,2150-2151,2153-2154 via svnmerge from svn+ssh://teichmann@thoe/home/projects/Geospatial/bsh-generischer-viewer/Material/SVN/flys-artifacts/branches/facets-slt ........ r2127 | ingo | 2011-06-16 09:50:56 +0200 (Do, 16 Jun 2011) | 1 line Added a compute() method to WINFOArtifact which acts as a dispatcher for different computations. It triggers a calculation based on ComputeCallbacks that are generated by the current states. ........ r2128 | ingo | 2011-06-16 10:25:06 +0200 (Do, 16 Jun 2011) | 1 line Moved Waterlevel state into the correct package. ........ r2129 | ingo | 2011-06-16 10:43:58 +0200 (Do, 16 Jun 2011) | 1 line Added two more compute() methods to ComputeCallback to distinguish between different phases of the artifact. ........ r2130 | ingo | 2011-06-16 10:57:05 +0200 (Do, 16 Jun 2011) | 1 line Use enums to dispatch computeFeed() and computeAdvance(). ........ r2131 | ingo | 2011-06-16 11:04:59 +0200 (Do, 16 Jun 2011) | 1 line Store facets for each state. ........ r2132 | ingo | 2011-06-16 12:05:44 +0200 (Do, 16 Jun 2011) | 1 line Generated facets for each output aspect. ........ r2133 | ingo | 2011-06-16 15:24:00 +0200 (Do, 16 Jun 2011) | 1 line Write computed facets into artifacts describe document. ........ r2136 | ingo | 2011-06-16 16:10:49 +0200 (Do, 16 Jun 2011) | 1 line Add index and description of facets to collections describe document. ........ r2137 | ingo | 2011-06-16 16:31:41 +0200 (Do, 16 Jun 2011) | 1 line OutGenerators doOut() takes a facet object now instead of just its name. ........ r2140 | ingo | 2011-06-17 11:19:43 +0200 (Fr, 17 Jun 2011) | 1 line OutGenerators use now facets to fetch necessary data. ........ r2143 | teichmann | 2011-06-17 12:40:54 +0200 (Fr, 17 Jun 2011) | 1 line Removed ComputeCallback because this was thought too complicated. Fixed issue with facets not be re-generated if same state is entered again. ........ r2144 | teichmann | 2011-06-17 13:08:31 +0200 (Fr, 17 Jun 2011) | 1 line make getGauges() more robust ........ r2146 | teichmann | 2011-06-17 13:23:57 +0200 (Fr, 17 Jun 2011) | 1 line mico opt: inter cmps are faster than str cmps. ........ r2150 | teichmann | 2011-06-17 15:10:20 +0200 (Fr, 17 Jun 2011) | 1 line call computeAdvance() if we want to advance. ........ r2151 | teichmann | 2011-06-17 15:45:50 +0200 (Fr, 17 Jun 2011) | 1 line Base WST/CSV exports on facets. TODO: generate the facets. ........ r2153 | teichmann | 2011-06-17 16:03:29 +0200 (Fr, 17 Jun 2011) | 1 line Add facet to access raw computed data. ........ r2154 | teichmann | 2011-06-17 16:37:09 +0200 (Fr, 17 Jun 2011) | 1 line Generate data facets for the computed states. ........ flys-artifacts/trunk@2156 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 17 Jun 2011 16:17:03 +0000
parents 7c018f466d6d
children 854620e52971
line wrap: on
line source
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dc:template xmlns:dc="http://www.intevation.org/2011/Datacage">
<datacage>
  <dc:context>
    <dc:statement>
      SELECT id AS river_id, name as river_name FROM rivers
      WHERE name ILIKE ${river}
    </dc:statement>
    <dc:elements>
      <river>
        <dc:attribute name="name" value="${river_name}"/>
        <dc:attribute name="river-id" value="${river_id}"/>
        <discharge-table-nn>
          <discharge-table-gauge>
            <dc:context>
              <dc:statement>
                SELECT id   AS gauge_id,
                       name AS gauge_name
                FROM gauges WHERE river_id = ${river_id}
              </dc:statement>
              <dc:elements>
                <gauge>
                  <dc:attribute name="name" value="${gauge_name}"/>
                  <dc:attribute name="gauge-id" value="${gauge_id}"/>
                  <dc:context>
                    <dc:statement>
                      SELECT description   AS gauge_desc, 
                             d.id          AS discharge_id,
                             ti.start_time AS g_start, 
                             ti.stop_time  AS g_stop
                      FROM discharge_tables d JOIN time_intervals ti 
                      ON d.time_interval_id = ti.id
                      WHERE d.gauge_id = ${gauge_id} AND d.kind = 1
                    </dc:statement>
                    <dc:elements>
                      <historical>
                        <dc:attribute name="name" value="${gauge_desc}"/>
                        <dc:attribute name="from" value="${g_start}"/>
                        <dc:attribute name="to" value="${g_stop}"/>
                        <dc:attribute name="discharge-id" value="${discharge_id}"/></historical>
                    </dc:elements>
                  </dc:context>
                </gauge>
              </dc:elements>
            </dc:context>
          </discharge-table-gauge>
          <fixations>
            <dc:attribute name="id" value="fixations-${river_id}"/>
            <dc:context>
              <dc:statement>
                SELECT id          AS fix_id,
                       description AS fix_description
                FROM wsts WHERE kind = 2 AND river_id = ${river_id}
              </dc:statement>
              <dc:elements>
                <fixation>
                  <dc:attribute name="name" value="${fix_description}"/>
                  <dc:attribute name="fix-id" value="${fix_id}"/>
                  <columns>
                    <dc:context>
                      <dc:statement>
                        SELECT id   AS fix_column_id,
                               name AS fix_column_name
                        FROM wst_columns WHERE wst_id = ${fix_id}
                        ORDER by position
                      </dc:statement>
                      <dc:elements>
                        <column>
                          <dc:attribute name="name" value="${fix_column_name}"/>
                          <dc:attribute name="column-id" value="${fix_column_id}"/></column>
                      </dc:elements>
                    </dc:context>
                  </columns>
                </fixation>
              </dc:elements>
            </dc:context>
          </fixations>
          <flood-protections>
            <dc:attribute name="id" value="flood-protections-${river_id}"/>
            <dc:context>
              <dc:statement>
                SELECT id          AS prot_id,
                       description AS prot_description
                FROM wsts WHERE kind = 5 AND river_id = ${river_id}
              </dc:statement>
              <dc:elements>
                <flood-protection>
                  <dc:attribute name="name" value="${prot_description}"/>
                  <dc:attribute name="prot-id" value="${prot_id}"/>
                  <columns>
                    <dc:context>
                      <dc:statement>
                        SELECT id   AS prot_column_id,
                               name AS prot_column_name
                        FROM wst_columns WHERE wst_id = ${prot_id}
                        ORDER by position
                      </dc:statement>
                      <dc:elements>
                        <column>
                          <dc:attribute name="name" value="${prot_column_name}"/>
                          <dc:attribute name="column-id" value="${prot_column_id}"/></column>
                      </dc:elements>
                    </dc:context>
                  </columns>
                </flood-protection>
              </dc:elements>
            </dc:context>
          </flood-protections>
          <flood-water-marks>
            <dc:attribute name="id" value="flood-water-marks-${river_id}"/>
            <dc:context>
              <dc:statement>
                SELECT id          AS fw_id,
                       description AS fw_description
                FROM wsts WHERE kind = 4 AND river_id = ${river_id}
              </dc:statement>
              <dc:elements>
                <flood-water-mark>
                  <dc:attribute name="name" value="${fw_description}"/>
                  <dc:attribute name="fw-id" value="${fw_id}"/>
                  <columns>
                    <dc:context>
                      <dc:statement>
                        SELECT id   AS fw_column_id,
                               name AS fw_column_name
                        FROM wst_columns WHERE wst_id = ${fw_id}
                        ORDER by position
                      </dc:statement>
                      <dc:elements>
                        <column>
                          <dc:attribute name="name" value="${fw_column_name}"/>
                          <dc:attribute name="column-id" value="${fw_column_id}"/></column>
                      </dc:elements>
                    </dc:context>
                  </columns>
                </flood-water-mark>
              </dc:elements>
            </dc:context>
          </flood-water-marks>
          <water-levels>
            <dc:attribute name="id" value="water-levels-${river_id}"/>
            <dc:context>
              <dc:statement>
                SELECT id          AS wl_id,
                       description AS wl_description
                FROM wsts WHERE kind = 0 AND river_id = ${river_id}
              </dc:statement>
              <dc:elements>
                <water-level>
                  <dc:attribute name="name" value="${wl_description}"/>
                  <dc:attribute name="wl-id" value="${wl_id}"/>
                  <columns>
                    <dc:context>
                      <dc:statement>
                        SELECT id   AS wl_column_id,
                               name AS wl_column_name
                        FROM wst_columns WHERE wst_id = ${wl_id}
                        ORDER by position
                      </dc:statement>
                      <dc:elements>
                        <column>
                          <dc:attribute name="name" value="${wl_column_name}"/>
                          <dc:attribute name="column-id" value="${wl_column_id}"/></column>
                      </dc:elements>
                    </dc:context>
                  </columns>
                </water-level>
              </dc:elements>
            </dc:context>
          </water-levels>
          <extra-longitudinal-sections>
            <dc:attribute name="id" value="extra-longitudinal-sections-${river_id}"/>
            <dc:context>
              <dc:statement>
                SELECT id          AS els_id,
                       description AS els_description
                FROM wsts WHERE kind = 1 AND river_id = ${river_id}
              </dc:statement>
              <dc:elements>
                <extra-longitudinal-section>
                  <dc:attribute name="name" value="${els_description}"/>
                  <dc:attribute name="els-id" value="${els_id}"/>
                  <columns>
                    <dc:context>
                      <dc:statement>
                        SELECT id   AS els_column_id,
                               name AS els_column_name
                        FROM wst_columns WHERE wst_id = ${els_id}
                        ORDER by position
                      </dc:statement>
                      <dc:elements>
                        <column>
                            <dc:attribute name="name" value="${els_column_name}"/>
                            <dc:attribute name="column-id" value="${els_column_id}"/></column>
                      </dc:elements>
                    </dc:context>
                  </columns>
                </extra-longitudinal-section>
              </dc:elements>
            </dc:context>
          </extra-longitudinal-sections>
        </discharge-table-nn>
        <longitudinal-section>
          <fixations><dc:attribute name="ref" value="fixations-${river_id}"/></fixations>
          <flood-protections><dc:attribute name="ref" value="flood-protections-${river_id}"/></flood-protections>
          <flood-water-marks><dc:attribute name="ref" value="flood-water-marks-${river_id}"/></flood-water-marks>
          <water-levels><dc:attribute name="ref" value="water-levels-${river_id}"/></water-levels>
          <extra-longitudinal-sections><dc:attribute name="ref" value="extra-longitudinal-sections-${river_id}"/></extra-longitudinal-sections>
        </longitudinal-section>
      </river>
    </dc:elements>
  </dc:context>
</datacage>
</dc:template>

http://dive4elements.wald.intevation.org