Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
4834:601f9d69cc10 | 4835:8e72777c961c |
---|---|
9 | 9 |
10 import de.intevation.flys.artifacts.access.Calculation4Access; | 10 import de.intevation.flys.artifacts.access.Calculation4Access; |
11 | 11 |
12 import de.intevation.flys.artifacts.model.Calculation4; | 12 import de.intevation.flys.artifacts.model.Calculation4; |
13 import de.intevation.flys.artifacts.model.CalculationResult; | 13 import de.intevation.flys.artifacts.model.CalculationResult; |
14 import de.intevation.flys.artifacts.model.ConstantWQKms; | |
14 import de.intevation.flys.artifacts.model.CrossSectionWaterLineFacet; | 15 import de.intevation.flys.artifacts.model.CrossSectionWaterLineFacet; |
15 import de.intevation.flys.artifacts.model.DataFacet; | 16 import de.intevation.flys.artifacts.model.DataFacet; |
16 import de.intevation.flys.artifacts.model.EmptyFacet; | 17 import de.intevation.flys.artifacts.model.EmptyFacet; |
17 import de.intevation.flys.artifacts.model.FacetTypes; | 18 import de.intevation.flys.artifacts.model.FacetTypes; |
18 import de.intevation.flys.artifacts.model.ReportFacet; | 19 import de.intevation.flys.artifacts.model.ReportFacet; |
68 else { | 69 else { |
69 nameW = wqkms[i].getName(); | 70 nameW = wqkms[i].getName(); |
70 nameQ = "Q(" + nameW + ")"; | 71 nameQ = "Q(" + nameW + ")"; |
71 } | 72 } |
72 | 73 |
73 Facet w = new WaterlevelFacet( | 74 // Do not generate Waterlevel/Waterline facets |
74 i, DISCHARGE_LONGITUDINAL_W, nameW); | 75 // for Q only curves. |
76 if (!(wqkms[i] instanceof ConstantWQKms)) { | |
77 | |
78 Facet w = new WaterlevelFacet( | |
79 i, DISCHARGE_LONGITUDINAL_W, nameW); | |
80 | |
81 Facet s = new CrossSectionWaterLineFacet(i, nameW); | |
82 | |
83 facets.add(s); | |
84 facets.add(w); | |
85 } | |
75 | 86 |
76 Facet q = new WaterlevelFacet( | 87 Facet q = new WaterlevelFacet( |
77 i, DISCHARGE_LONGITUDINAL_Q, nameQ); | 88 i, DISCHARGE_LONGITUDINAL_Q, nameQ); |
78 | 89 |
79 Facet s = new CrossSectionWaterLineFacet(i, nameW); | |
80 | |
81 facets.add(s); | |
82 facets.add(w); | |
83 facets.add(q); | 90 facets.add(q); |
84 | 91 |
85 if (wqkms[i] instanceof WQCKms) { | 92 if (wqkms[i] instanceof WQCKms) { |
86 // TODO DO i18n | 93 // TODO DO i18n |
87 | 94 |