# HG changeset patch # User Felix Wolfsteller # Date 1344850881 0 # Node ID accb64be866cdcc4f79ca4a042b9e62142319967 # Parent bae185bf9d2d80d0f7983bd1d291212ea2d75ac5 Add annotations to fixA longitudinal Sections. flys-artifacts/trunk@5195 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r bae185bf9d2d -r accb64be866c flys-artifacts/ChangeLog --- 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 + + * 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 * doc/conf/themes.xml, doc/conf/default-themes.xml: diff -r bae185bf9d2d -r accb64be866c flys-artifacts/doc/conf/meta-data.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 @@ + + + @@ -650,6 +653,13 @@ + + + + + + + @@ -1457,6 +1467,151 @@ + + + + + + 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}) + + + + + + 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 = 'fix_deviation_ls' + ORDER BY num ASC, name DESC + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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}) + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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}) + + + + + + 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 + + + + + + + + + + + + + + + + + + + + + + diff -r bae185bf9d2d -r accb64be866c flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixLongitudinalSectionGenerator.java --- 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;