teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5863: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5863: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model.fixings; sascha@3461: teichmann@5831: import org.dive4elements.artifactdatabase.state.Facet; sascha@3461: teichmann@5831: import org.dive4elements.river.artifacts.model.CalculationResult; teichmann@5831: import org.dive4elements.river.artifacts.model.WQKms; teichmann@5831: import org.dive4elements.river.artifacts.model.WaterlevelFacet; teichmann@5831: teichmann@5831: import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; sascha@3461: felix@5644: /** Waterlevel from fix realize compute. */ sascha@3461: public class FixWaterlevelFacet sascha@3461: extends WaterlevelFacet sascha@3461: { sascha@3461: public FixWaterlevelFacet() { sascha@3461: } sascha@3461: sascha@3461: public FixWaterlevelFacet(int index, String name, String description) { sascha@3461: super(index, name, description, ComputeType.ADVANCE, null, null); sascha@3461: } sascha@3461: sascha@3461: public FixWaterlevelFacet( sascha@3461: int index, sascha@3461: String name, sascha@3461: String description, sascha@3461: ComputeType type, sascha@3461: String stateID, sascha@3461: String hash sascha@3461: ) { sascha@3461: super(index, name, description, type, hash, stateID); sascha@3461: } sascha@3461: sascha@3461: @Override sascha@3461: protected WQKms [] getWQKms(CalculationResult res) { sascha@3461: FixRealizingResult fr = (FixRealizingResult)res.getData(); sascha@3461: return fr != null ? fr.getWQKms() : null; sascha@3461: } sascha@3461: sascha@3461: /** Copy deeply. */ sascha@3461: @Override sascha@3461: public Facet deepCopy() { sascha@3461: FixWaterlevelFacet copy = new FixWaterlevelFacet(); sascha@3461: copy.set(this); sascha@3461: copy.type = type; sascha@3461: copy.hash = hash; sascha@3461: copy.stateId = stateId; sascha@3461: return copy; sascha@3461: } sascha@3461: } sascha@3461: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :