Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeLongitudinalSection.java @ 9425:3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
Also allows to have acces to the potentially already computed artifact result via its normal computation cache.
author | gernotbelger |
---|---|
date | Fri, 17 Aug 2018 15:31:02 +0200 |
parents | af13ceeba52a |
children | 2b83d3a96703 |
comparison
equal
deleted
inserted
replaced
9424:da19f1f58d72 | 9425:3f49835a00c3 |
---|---|
69 CallContext context, | 69 CallContext context, |
70 List<Facet> facets, | 70 List<Facet> facets, |
71 Object old | 71 Object old |
72 ) { | 72 ) { |
73 if (artifact instanceof ChartArtifact) { | 73 if (artifact instanceof ChartArtifact) { |
74 ChartArtifact chart = (ChartArtifact)artifact; | |
75 facets.add(new EmptyFacet()); | 74 facets.add(new EmptyFacet()); |
76 return null; | 75 return null; |
77 } | 76 } |
78 | 77 |
79 Calculation4Access access = new Calculation4Access(artifact); | 78 Calculation4Access access = new Calculation4Access(artifact); |
106 if (!(wqkms[i] instanceof ConstantWQKms)) { | 105 if (!(wqkms[i] instanceof ConstantWQKms)) { |
107 | 106 |
108 Facet w = new WaterlevelFacet( | 107 Facet w = new WaterlevelFacet( |
109 i, DISCHARGE_LONGITUDINAL_W, nameW); | 108 i, DISCHARGE_LONGITUDINAL_W, nameW); |
110 | 109 |
111 Facet s = new CrossSectionWaterLineFacet(i, nameW); | 110 Facet s = new CrossSectionWaterLineFacet(i, nameW, ComputeType.ADVANCE, hash, getID(), Integer.valueOf(i)); |
112 | 111 |
113 Facet q = new WaterlevelFacet( | 112 Facet q = new WaterlevelFacet( |
114 i, DISCHARGE_LONGITUDINAL_Q, nameQ); | 113 i, DISCHARGE_LONGITUDINAL_Q, nameQ); |
115 facets.add(s); | 114 facets.add(s); |
116 facets.add(w); | 115 facets.add(w); |
139 Facet c = new WaterlevelFacet( | 138 Facet c = new WaterlevelFacet( |
140 i, DISCHARGE_LONGITUDINAL_C, nameC); | 139 i, DISCHARGE_LONGITUDINAL_C, nameC); |
141 | 140 |
142 // Here, avoid index clash with Facet "s" above and | 141 // Here, avoid index clash with Facet "s" above and |
143 // signal the WINFO later that we want to access Cs. | 142 // signal the WINFO later that we want to access Cs. |
144 Facet r = new CrossSectionWaterLineFacet(i + 1, nameC); | 143 Facet r = new CrossSectionWaterLineFacet(i + 1, nameC, ComputeType.ADVANCE, hash, getID(), Integer.valueOf(i + 1)); |
145 | 144 |
146 facets.add(c); | 145 facets.add(c); |
147 facets.add(r); | 146 facets.add(r); |
148 } | 147 } |
149 } | 148 } |