teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts; felix@1980: gernotbelger@9425: import java.io.Serializable; felix@4478: gernotbelger@9425: import org.dive4elements.artifacts.CallContext; gernotbelger@9425: import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; felix@4478: felix@1980: /** sascha@2120: * Interface, Artifact can create WaterLines (Water against Cross-Profile). felix@1980: */ felix@1980: public interface WaterLineArtifact { felix@1980: gernotbelger@9425: /** gernotbelger@9425: * Get points that define a line of a (water)facet against a cross- gernotbelger@9425: * section. gernotbelger@9425: * gernotbelger@9425: * @param stateId gernotbelger@9425: * @param hash gernotbelger@9425: * gernotbelger@9425: * @param waterLineIndex gernotbelger@9425: * The object whith wich this artifact determines which of the waterlevels to return. Given to the facet when gernotbelger@9425: * constructed. Can be an integer in the simple case, or a more complex description. gernotbelger@9425: */ gernotbelger@9425: // REMARK: we are giving type, hash and stateId so individual artifacts may call back on their compute method, which gernotbelger@9425: // needs gernotbelger@9425: // those to hash the result data. gernotbelger@9425: // Currently, the old implementations don't do that but simply execute the whole computation each time they are gernotbelger@9425: // called... gernotbelger@9425: // TODO: instead we should compute outside and provide the computed data to this method. gernotbelger@9425: double getWaterLevel(ComputeType type, String hash, String stateId, double currentKm, Serializable waterLineIndex, double nextKm, double prevKm, gernotbelger@9425: CallContext context); gernotbelger@9425: }