Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/HistoricalDischargeCurveFacet.java @ 5831:bd047b71ab37
Repaired internal references
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:06:39 +0200 |
parents | flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeCurveFacet.java@49cb65d5932d |
children |
comparison
equal
deleted
inserted
replaced
5830:160f53ee0870 | 5831:bd047b71ab37 |
---|---|
1 package org.dive4elements.river.artifacts.model; | |
2 | |
3 import org.dive4elements.artifactdatabase.state.Facet; | |
4 import org.dive4elements.artifacts.Artifact; | |
5 import org.dive4elements.artifacts.CallContext; | |
6 import org.dive4elements.river.artifacts.FLYSArtifact; | |
7 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; | |
8 | |
9 | |
10 /** | |
11 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
12 */ | |
13 public class HistoricalDischargeCurveFacet extends DataFacet { | |
14 | |
15 public HistoricalDischargeCurveFacet() { | |
16 } | |
17 | |
18 public HistoricalDischargeCurveFacet(int index, String name, | |
19 String description, ComputeType type, String stateID, String hash | |
20 | |
21 ) { | |
22 super(index, name, description, type, hash, stateID); | |
23 } | |
24 | |
25 @Override | |
26 public Facet deepCopy() { | |
27 WaterlevelFacet copy = new WaterlevelFacet(); | |
28 copy.set(this); | |
29 copy.type = type; | |
30 copy.hash = hash; | |
31 copy.stateId = stateId; | |
32 return copy; | |
33 } | |
34 | |
35 @Override | |
36 public Object getData(Artifact artifact, CallContext context) { | |
37 FLYSArtifact flys = (FLYSArtifact) artifact; | |
38 | |
39 CalculationResult res = (CalculationResult) flys.compute(context, hash, | |
40 stateId, type, false); | |
41 | |
42 HistoricalDischargeData data = (HistoricalDischargeData) res.getData(); | |
43 WQKms[] wqkms = (WQKms[]) data.getWQs(); | |
44 | |
45 return wqkms[index]; | |
46 } | |
47 } | |
48 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |