Mercurial > dive4elements > river
comparison artifacts/doc/conf/meta-data.xml @ 7278:03fa985dd044
issue1345: Minor refactoring, made structure for epoch loads equal year loads.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 10 Oct 2013 11:19:30 +0200 |
parents | 0ba4c4fbd410 |
children | 237d5305b1a9 |
comparison
equal
deleted
inserted
replaced
7277:0ba4c4fbd410 | 7278:03fa985dd044 |
---|---|
1303 target_out="{$out}" | 1303 target_out="{$out}" |
1304 info="{$description}" | 1304 info="{$description}" |
1305 ids="{$syid}" /> | 1305 ids="{$syid}" /> |
1306 </dc:for-each> | 1306 </dc:for-each> |
1307 </dc:macro> | 1307 </dc:macro> |
1308 | |
1309 <dc:macro name="loads"> | |
1310 <dc:if test="dc:has-result()"> | |
1311 <dc:filter expr="$fraction='sand'"> | |
1312 <dc:if test="dc:has-result()"> | |
1313 <sand> | |
1314 <dc:call-macro name="one-load"/> | |
1315 </sand> | |
1316 </dc:if> | |
1317 </dc:filter> | |
1318 <dc:filter expr="$fraction='fine_middle'"> | |
1319 <dc:if test="dc:has-result()"> | |
1320 <fine_middle> | |
1321 <dc:call-macro name="one-load"/> | |
1322 </fine_middle> | |
1323 </dc:if> | |
1324 </dc:filter> | |
1325 <dc:filter expr="$fraction='coarse'"> | |
1326 <dc:if test="dc:has-result()"> | |
1327 <coarse> | |
1328 <dc:call-macro name="one-load"/> | |
1329 </coarse> | |
1330 </dc:if> | |
1331 </dc:filter> | |
1332 <dc:filter expr="$fraction='suspended_sediment'"> | |
1333 <dc:if test="dc:has-result()"> | |
1334 <susp_sediment> | |
1335 <dc:call-macro name="one-load"/> | |
1336 </susp_sediment> | |
1337 </dc:if> | |
1338 </dc:filter> | |
1339 <dc:filter expr="$fraction='susp_sand'"> | |
1340 <dc:if test="dc:has-result()"> | |
1341 <susp_sand> | |
1342 <dc:call-macro name="one-load"/> | |
1343 </susp_sand> | |
1344 </dc:if> | |
1345 </dc:filter> | |
1346 <dc:filter expr="$fraction='susp_sand_bed'"> | |
1347 <dc:if test="dc:has-result()"> | |
1348 <susp_sand_bed> | |
1349 <dc:call-macro name="one-load"/> | |
1350 </susp_sand_bed> | |
1351 </dc:if> | |
1352 </dc:filter> | |
1353 </dc:if> | |
1354 </dc:macro> | |
1308 | 1355 |
1309 <dc:macro name="yields"> | 1356 <dc:macro name="yields"> |
1310 <yields> | 1357 <yields> |
1311 <years> | 1358 <years> |
1312 <dc:context> | 1359 <dc:context> |
1313 <dc:statement> | 1360 <dc:statement> |
1314 SELECT DISTINCT | 1361 SELECT DISTINCT |
1315 sy.id AS syid, | 1362 sy.id AS syid, |
1316 sy.description AS description, | 1363 sy.description AS description, |
1317 ti.start_time AS year, | 1364 ti.start_time AS year, |
1318 gf.name AS fraction | 1365 gf.name AS fraction |
1319 FROM sediment_yield sy | 1366 FROM sediment_yield sy |
1320 JOIN rivers r ON sy.river_id = r.id | 1367 JOIN rivers r ON sy.river_id = r.id |
1324 WHERE r.id = ${river_id} | 1371 WHERE r.id = ${river_id} |
1325 AND ti.stop_time IS NULL | 1372 AND ti.stop_time IS NULL |
1326 AND syv.station BETWEEN ${fromkm} AND ${tokm} | 1373 AND syv.station BETWEEN ${fromkm} AND ${tokm} |
1327 ORDER BY fraction | 1374 ORDER BY fraction |
1328 </dc:statement> | 1375 </dc:statement> |
1329 <dc:if test="dc:has-result()"> | 1376 <dc:call-macro name="loads"/> |
1330 <dc:filter expr="$fraction='sand'"> | |
1331 <dc:if test="dc:has-result()"> | |
1332 <sand> | |
1333 <dc:call-macro name="one-load"/> | |
1334 </sand> | |
1335 </dc:if> | |
1336 </dc:filter> | |
1337 <dc:filter expr="$fraction='fine_middle'"> | |
1338 <dc:if test="dc:has-result()"> | |
1339 <fine_middle> | |
1340 <dc:call-macro name="one-load"/> | |
1341 </fine_middle> | |
1342 </dc:if> | |
1343 </dc:filter> | |
1344 <dc:filter expr="$fraction='coarse'"> | |
1345 <dc:if test="dc:has-result()"> | |
1346 <coarse> | |
1347 <dc:call-macro name="one-load"/> | |
1348 </coarse> | |
1349 </dc:if> | |
1350 </dc:filter> | |
1351 <dc:filter expr="$fraction='suspended_sediment'"> | |
1352 <dc:if test="dc:has-result()"> | |
1353 <susp_sediment> | |
1354 <dc:call-macro name="one-load"/> | |
1355 </susp_sediment> | |
1356 </dc:if> | |
1357 </dc:filter> | |
1358 <dc:filter expr="$fraction='susp_sand'"> | |
1359 <dc:if test="dc:has-result()"> | |
1360 <susp_sand> | |
1361 <dc:call-macro name="one-load"/> | |
1362 </susp_sand> | |
1363 </dc:if> | |
1364 </dc:filter> | |
1365 <dc:filter expr="$fraction='susp_sand_bed'"> | |
1366 <dc:if test="dc:has-result()"> | |
1367 <susp_sand_bed> | |
1368 <dc:call-macro name="one-load"/> | |
1369 </susp_sand_bed> | |
1370 </dc:if> | |
1371 </dc:filter> | |
1372 </dc:if> | |
1373 </dc:context> | 1377 </dc:context> |
1374 </years> | 1378 </years> |
1375 <epochs> | 1379 <epochs> |
1376 <dc:context> | 1380 <dc:context> |
1377 <dc:statement> | 1381 <dc:statement> |
1378 SELECT DISTINCT | 1382 SELECT DISTINCT |
1379 sy.id AS syid, | 1383 sy.id AS syid, |
1380 sy.description AS description, | 1384 sy.description AS description, |
1381 ti.start_time AS year | 1385 ti.start_time AS year, |
1386 gf.name AS fraction | |
1382 FROM sediment_yield sy | 1387 FROM sediment_yield sy |
1383 JOIN rivers r ON sy.river_id = r.id | 1388 JOIN rivers r ON sy.river_id = r.id |
1384 JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id | 1389 JOIN sediment_yield_values syv ON sy.id = syv.sediment_yield_id |
1385 JOIN time_intervals ti ON sy.time_interval_id = ti.id | 1390 JOIN time_intervals ti ON sy.time_interval_id = ti.id |
1391 JOIN grain_fraction gf ON gf.id = sy.grain_fraction_id | |
1386 WHERE r.id = ${river_id} | 1392 WHERE r.id = ${river_id} |
1387 AND ti.stop_time IS NOT NULL | 1393 AND ti.stop_time IS NOT NULL |
1388 AND syv.station BETWEEN ${fromkm} AND ${tokm} | 1394 AND syv.station BETWEEN ${fromkm} AND ${tokm} |
1395 ORDER BY fraction | |
1389 </dc:statement> | 1396 </dc:statement> |
1390 <dc:if test="dc:has-result()"> | 1397 <dc:call-macro name="loads"/> |
1391 <dc:for-each> | |
1392 <epoch description="{$description}" | |
1393 factory="sedimentyield" | |
1394 target_out="{$out}" | |
1395 info="" | |
1396 ids="{$syid}" /> | |
1397 </dc:for-each> | |
1398 </dc:if> | |
1399 </dc:context> | 1398 </dc:context> |
1400 </epochs> | 1399 </epochs> |
1401 | 1400 |
1402 </yields> | 1401 </yields> |
1403 </dc:macro> | 1402 </dc:macro> |