Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/WaterLineArtifact.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 |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4478
diff
changeset
|
9 package org.dive4elements.river.artifacts; |
1980
d377b89d2827
Added WaterLineArtifact Interface.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
10 |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
11 import java.io.Serializable; |
4478
6153c50f78cf
WaterLineArtifact: Added callcontext-parameter to interfaces getWaterLine.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3272
diff
changeset
|
12 |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
13 import org.dive4elements.artifacts.CallContext; |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
14 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; |
4478
6153c50f78cf
WaterLineArtifact: Added callcontext-parameter to interfaces getWaterLine.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
3272
diff
changeset
|
15 |
1980
d377b89d2827
Added WaterLineArtifact Interface.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
16 /** |
2120
f021080cb409
Use improved caching for cross section lines data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1980
diff
changeset
|
17 * Interface, Artifact can create WaterLines (Water against Cross-Profile). |
1980
d377b89d2827
Added WaterLineArtifact Interface.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
18 */ |
d377b89d2827
Added WaterLineArtifact Interface.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
19 public interface WaterLineArtifact { |
d377b89d2827
Added WaterLineArtifact Interface.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff
changeset
|
20 |
9425
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
21 /** |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
22 * Get points that define a line of a (water)facet against a cross- |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
23 * section. |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
24 * |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
25 * @param stateId |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
26 * @param hash |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
27 * |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
28 * @param waterLineIndex |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
29 * The object whith wich this artifact determines which of the waterlevels to return. Given to the facet when |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
30 * constructed. Can be an integer in the simple case, or a more complex description. |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
31 */ |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
32 // REMARK: we are giving type, hash and stateId so individual artifacts may call back on their compute method, which |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
33 // needs |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
34 // those to hash the result data. |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
35 // Currently, the old implementations don't do that but simply execute the whole computation each time they are |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
36 // called... |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
37 // TODO: instead we should compute outside and provide the computed data to this method. |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
38 double getWaterLevel(ComputeType type, String hash, String stateId, double currentKm, Serializable waterLineIndex, double nextKm, double prevKm, |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
39 CallContext context); |
3f49835a00c3
Extended CrossSectionFacet so it may fetch different data from within the artifact result.
gernotbelger
parents:
5994
diff
changeset
|
40 } |