Mercurial > dive4elements > river
changeset 3579:accb64be866c
Add annotations to fixA longitudinal Sections.
flys-artifacts/trunk@5195 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 13 Aug 2012 09:41:21 +0000 |
parents | bae185bf9d2d |
children | 93f3004451b4 |
files | flys-artifacts/ChangeLog flys-artifacts/doc/conf/meta-data.xml flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixLongitudinalSectionGenerator.java |
diffstat | 3 files changed, 172 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Aug 13 07:35:57 2012 +0000 +++ b/flys-artifacts/ChangeLog Mon Aug 13 09:41:21 2012 +0000 @@ -1,3 +1,11 @@ +2012-08-13 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * doc/conf/meta-data.xml: Load annotations for fixA long.sections. + Add stubs for "old calculations"-dc-conf for various FixA outs. + + * src/main/java/de/intevation/flys/exports/fixings/FixLongitudinalSectionGenerator.java: + Handle annotation outs. + 2012-08-13 Felix Wolfsteller <felix.wolfsteller@intevation.de> * doc/conf/themes.xml, doc/conf/default-themes.xml:
--- a/flys-artifacts/doc/conf/meta-data.xml Mon Aug 13 07:35:57 2012 +0000 +++ b/flys-artifacts/doc/conf/meta-data.xml Mon Aug 13 09:41:21 2012 +0000 @@ -603,6 +603,9 @@ <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> <dc:call-macro name="qsectors"/> </dc:if> + <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> + <dc:call-macro name="annotations"/> + </dc:if> </dc:when> <dc:otherwise> <dc:comment> @@ -650,6 +653,13 @@ <dc:call-macro name="basedata_4_heightmarks-points-relative_points"/> <dc:call-macro name="basedata_5_flood-protections_relative_points"/> </dc:if> + <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> + <dc:call-macro name="basedata_0"/> + <dc:call-macro name="basedata_1_additionals"/> + </dc:if> + <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> + <dc:call-macro name="annotations"/> + </dc:if> <dc:comment comment="--- non-recommendations---"/> </dc:otherwise> </dc:choose> @@ -1457,6 +1467,151 @@ </waterlevels> </dc:if> + <dc:if test="dc:contains($artifact-outs, 'fix_longitudinal_section_curve')"> + <waterlevels> + <dc:elements> + <dc:context> + <dc:statement> + SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation + FROM master_artifacts 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}) + </dc:statement> + <dc:elements> + + <dc:context> + <dc:statement> + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'fix_longitudinal_section_curve' + </dc:statement> + <dc:elements> + <dc:context> + <!-- average und deviation ls_0 . ls_1 ...--> + <dc:statement> + SELECT name AS facet_name, num as facet_num, description AS facet_description + FROM facets + WHERE out_id = ${out_id} and name = 'fix_deviation_ls' + ORDER BY num ASC, name DESC + </dc:statement> + <waterlevels> + <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> + <dc:elements> + <dc:element name="${facet_name}"> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="factory" value="fixanalysis"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="fix_longitudinal_section_curve"/> + </dc:element> + </dc:elements> + </waterlevels> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </waterlevels> + </dc:if> + + <dc:if test="dc:contains($artifact-outs, 'fix_deltawt_curve')"> + <waterlevels> + <dc:elements> + <dc:context> + <dc:statement> + SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation + FROM master_artifacts 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}) + </dc:statement> + <dc:elements> + + <dc:context> + <dc:statement> + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' + </dc:statement> + <dc:elements> + <dc:context> + <dc:statement> + 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 + </dc:statement> + <waterlevels> + <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> + <dc:elements> + <dc:element name="${facet_name}"> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="factory" value="winfo"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="longitudinal_section"/> + </dc:element> + </dc:elements> + </waterlevels> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </waterlevels> + </dc:if> + + <dc:if test="dc:contains($artifact-outs, 'fix_wq_curve')"> + <waterlevels> + <dc:elements> + <dc:context> + <dc:statement> + SELECT m.id AS a_id, m.state AS a_state, m.gid AS a_gid, m.creation AS a_creation + FROM master_artifacts 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}) + </dc:statement> + <dc:elements> + + <dc:context> + <dc:statement> + SELECT id AS out_id + FROM outs + WHERE artifact_id = ${a_id} AND name = 'longitudinal_section' + </dc:statement> + <dc:elements> + <dc:context> + <dc:statement> + 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 + </dc:statement> + <waterlevels> + <dc:attribute name="description" value="${river} ${a_creation} ${collection_name}"/> + <dc:elements> + <dc:element name="${facet_name}"> + <dc:attribute name="description" value="${facet_description}"/> + <dc:attribute name="ids" value="${facet_num}"/> + <dc:attribute name="factory" value="winfo"/> + <dc:attribute name="artifact-id" value="${a_gid}"/> + <dc:attribute name="out" value="longitudinal_section"/> + </dc:element> + </dc:elements> + </waterlevels> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </dc:context> + </dc:elements> + </waterlevels> + </dc:if> + <dc:if test="dc:contains($artifact-outs, 'duration_curve')"> <computed_discharge_curves> <dc:elements>
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixLongitudinalSectionGenerator.java Mon Aug 13 07:35:57 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixLongitudinalSectionGenerator.java Mon Aug 13 09:41:21 2012 +0000 @@ -5,6 +5,7 @@ import de.intevation.flys.artifacts.model.fixings.AnalysisPeriod; import de.intevation.flys.artifacts.model.fixings.QWD; import de.intevation.flys.exports.ChartGenerator; +import de.intevation.flys.jfree.FLYSAnnotation; import de.intevation.flys.jfree.StyledAreaSeriesCollection; import de.intevation.flys.jfree.StyledXYSeries; import de.intevation.flys.utils.KMIndex; @@ -60,7 +61,7 @@ @Override public void doOut(ArtifactAndFacet aaf, Document doc, boolean visible) { String name = aaf.getFacetName(); - logger.debug("doOut: " + name); + logger.debug("FixLongitudinalSectionGenerator: doOut: " + name); if (name.contains(FIX_SECTOR_AVERAGE_LS_DEVIATION)) { doSectorAverageDeviationOut(aaf, doc, visible); @@ -77,6 +78,13 @@ else if (name.equals(FIX_DEVIATION_LS)) { doReferenceDeviationOut(aaf, doc, visible); } + else if (name.equals(LONGITUDINAL_ANNOTATION)) { + doAnnotations( + (FLYSAnnotation) aaf.getData(context), + aaf, + doc, + visible); + } else { logger.warn("Unknown facet name " + name); return;