Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java @ 4835:8e72777c961c
Introduced a fake ConstantWQKms class to have type information to only generate w facets for curves which really carry w data.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 23 Jan 2013 05:53:44 +0100 |
parents | 65bfb6faa538 |
children | fc0cdcae8f07 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java Tue Jan 22 15:13:58 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DischargeLongitudinalSection.java Wed Jan 23 05:53:44 2013 +0100 @@ -11,6 +11,7 @@ import de.intevation.flys.artifacts.model.Calculation4; import de.intevation.flys.artifacts.model.CalculationResult; +import de.intevation.flys.artifacts.model.ConstantWQKms; import de.intevation.flys.artifacts.model.CrossSectionWaterLineFacet; import de.intevation.flys.artifacts.model.DataFacet; import de.intevation.flys.artifacts.model.EmptyFacet; @@ -70,16 +71,22 @@ nameQ = "Q(" + nameW + ")"; } - Facet w = new WaterlevelFacet( - i, DISCHARGE_LONGITUDINAL_W, nameW); + // Do not generate Waterlevel/Waterline facets + // for Q only curves. + if (!(wqkms[i] instanceof ConstantWQKms)) { + + Facet w = new WaterlevelFacet( + i, DISCHARGE_LONGITUDINAL_W, nameW); + + Facet s = new CrossSectionWaterLineFacet(i, nameW); + + facets.add(s); + facets.add(w); + } Facet q = new WaterlevelFacet( i, DISCHARGE_LONGITUDINAL_Q, nameQ); - Facet s = new CrossSectionWaterLineFacet(i, nameW); - - facets.add(s); - facets.add(w); facets.add(q); if (wqkms[i] instanceof WQCKms) {