ingo@392: package de.intevation.flys.artifacts.states;
ingo@392:
ingo@687: import java.util.List;
ingo@687:
ingo@392: import org.apache.log4j.Logger;
ingo@392:
ingo@687: import de.intevation.artifactdatabase.state.Facet;
ingo@687:
ingo@687: import de.intevation.flys.artifacts.FLYSArtifact;
ingo@687: import de.intevation.flys.artifacts.WINFOArtifact;
ingo@687: import de.intevation.flys.artifacts.model.ComputeCallback;
ingo@689: import de.intevation.flys.artifacts.model.ComputeCallbackAdapter;
ingo@687:
ingo@392: /**
ingo@392: * The final state that will be reached after the discharge curve calculation
ingo@392: * mode has been chosen.
ingo@392: *
ingo@392: * @author Ingo Weinzierl
ingo@392: */
ingo@392: public class ComputedDischargeCurveState extends DefaultState {
ingo@392:
ingo@392: /** The logger that is used in this state.*/
ingo@392: private static Logger logger =
ingo@392: Logger.getLogger(ComputedDischargeCurveState.class);
ingo@392:
sascha@660: public ComputedDischargeCurveState() {
ingo@392: }
ingo@687:
ingo@687:
ingo@687: @Override
ingo@687: public ComputeCallback createComputeCallback(
ingo@687: String hash, FLYSArtifact flys)
ingo@687: {
ingo@687: final WINFOArtifact winfo = (WINFOArtifact) flys;
ingo@687:
ingo@689: return new ComputeCallbackAdapter() {
ingo@689:
ingo@689: @Override
ingo@689: public Object computeAdvance(List facets) {
ingo@687: return winfo.getComputedDischargeCurveData();
ingo@687: }
ingo@687: };
ingo@687: }
ingo@392: }
ingo@392: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :