diff 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
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeLongitudinalSection.java	Fri Aug 17 14:29:05 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/DischargeLongitudinalSection.java	Fri Aug 17 15:31:02 2018 +0200
@@ -71,7 +71,6 @@
         Object       old
     ) {
         if (artifact instanceof ChartArtifact) {
-            ChartArtifact chart = (ChartArtifact)artifact;
             facets.add(new EmptyFacet());
             return null;
         }
@@ -108,7 +107,7 @@
                 Facet w = new WaterlevelFacet(
                     i, DISCHARGE_LONGITUDINAL_W, nameW);
 
-                Facet s = new CrossSectionWaterLineFacet(i, nameW);
+                Facet s = new CrossSectionWaterLineFacet(i, nameW, ComputeType.ADVANCE, hash, getID(), Integer.valueOf(i));
 
                 Facet q = new WaterlevelFacet(
                     i, DISCHARGE_LONGITUDINAL_Q, nameQ);
@@ -141,7 +140,7 @@
 
                 // Here, avoid index clash with Facet "s" above and
                 // signal the WINFO later that we want to access Cs.
-                Facet r = new CrossSectionWaterLineFacet(i + 1, nameC);
+                Facet r = new CrossSectionWaterLineFacet(i + 1, nameC, ComputeType.ADVANCE, hash, getID(), Integer.valueOf(i + 1));
 
                 facets.add(c);
                 facets.add(r);

http://dive4elements.wald.intevation.org