Mercurial > dive4elements > river
changeset 703:af3b5d9e91a4 facets-slt
Generate data facets for the computed states.
flys-artifacts/branches/facets-slt@2154 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 17 Jun 2011 14:37:09 +0000 |
parents | 32ed5d789e50 |
children | eab5e5089d77 ff1d78db8820 |
files | flys-artifacts/doc/conf/artifacts/winfo.xml flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java |
diffstat | 5 files changed, 29 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/artifacts/winfo.xml Fri Jun 17 14:03:29 2011 +0000 +++ b/flys-artifacts/doc/conf/artifacts/winfo.xml Fri Jun 17 14:37:09 2011 +0000 @@ -180,7 +180,7 @@ <outputmode name="discharge_longitudinal_section_export" description="output.discharge_longitudinal_section_export" mime-type="text/plain"> <facets> <facet name="csv" description="facet.discharge_longitudinal_section_export.csv" /> - <facet name="wst" description="facet.discharge_longitudinal_section_export.csv" /> + <facet name="wst" description="facet.discharge_longitudinal_section_export.wst" /> </facets> </outputmode> </outputmodes>
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java Fri Jun 17 14:03:29 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/ComputedDischargeCurveState.java Fri Jun 17 14:37:09 2011 +0000 @@ -10,11 +10,15 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.WINFOArtifact; + import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WaterlevelFacet; +import de.intevation.flys.artifacts.model.DataFacet; import de.intevation.flys.artifacts.model.WQKms; + import de.intevation.flys.artifacts.resources.Resources; + /** * The final state that will be reached after the discharge curve calculation * mode has been chosen. @@ -68,9 +72,8 @@ "", args); - Facet q = new WaterlevelFacet(0, COMPUTED_DISCHARGE_Q, name); - - facets.add(q); + facets.add(new WaterlevelFacet(0, COMPUTED_DISCHARGE_Q, name)); + facets.add(new DataFacet(CSV, "CSV data")); return new WQKms[] { res }; }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java Fri Jun 17 14:03:29 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java Fri Jun 17 14:37:09 2011 +0000 @@ -15,6 +15,8 @@ import de.intevation.flys.artifacts.model.WQKms; import de.intevation.flys.artifacts.model.WQCKms; +import de.intevation.flys.artifacts.model.DataFacet; + public class DischargeLongitudinalSection extends DefaultState implements FacetTypes @@ -83,6 +85,11 @@ } } + if (res.length > 0) { + facets.add(new DataFacet(CSV, "CSV data")); + facets.add(new DataFacet(WST, "WST data")); + } + return res; } }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java Fri Jun 17 14:03:29 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DurationCurveState.java Fri Jun 17 14:37:09 2011 +0000 @@ -15,6 +15,9 @@ import de.intevation.flys.artifacts.model.WQDay; import de.intevation.flys.artifacts.resources.Resources; +import de.intevation.flys.artifacts.model.DataFacet; + + /** * The final state that will be reached after the duration curve calculation * mode has been chosen. @@ -77,6 +80,8 @@ facets.add(w); facets.add(q); + facets.add(new DataFacet(CSV, "CSV data")); + return new WQDay[] { res }; } }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java Fri Jun 17 14:03:29 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelState.java Fri Jun 17 14:37:09 2011 +0000 @@ -19,6 +19,8 @@ import de.intevation.flys.artifacts.model.WaterlevelFacet; import de.intevation.flys.artifacts.model.WQKms; +import de.intevation.flys.artifacts.model.DataFacet; + public class WaterlevelState extends DefaultState @@ -85,6 +87,14 @@ facets.add(q); } + if (res.length > 0) { + Facet wst = new DataFacet(WST, "WST data"); + Facet csv = new DataFacet(CSV, "CSV data"); + + facets.add(wst); + facets.add(csv); + } + return res; } }