Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeFacet.java @ 2215:ebbb18ed78c4
Added new classes and stubs used to calculate data for historical discharge curve charts.
flys-artifacts/trunk@3854 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 01 Feb 2012 11:14:24 +0000 |
parents | |
children | e7843533f086 |
comparison
equal
deleted
inserted
replaced
2214:4cd0eb2ebb3b | 2215:ebbb18ed78c4 |
---|---|
1 package de.intevation.flys.artifacts.model; | |
2 | |
3 import org.apache.log4j.Logger; | |
4 | |
5 import de.intevation.artifacts.Artifact; | |
6 import de.intevation.artifacts.CallContext; | |
7 | |
8 import de.intevation.artifactdatabase.state.Facet; | |
9 | |
10 import de.intevation.flys.artifacts.FLYSArtifact; | |
11 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; | |
12 | |
13 | |
14 /** | |
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | |
16 */ | |
17 public class HistoricalDischargeFacet extends DataFacet { | |
18 | |
19 private static final Logger logger = | |
20 Logger.getLogger(HistoricalDischargeFacet.class); | |
21 | |
22 | |
23 public HistoricalDischargeFacet() { | |
24 } | |
25 | |
26 | |
27 public HistoricalDischargeFacet(int index, String name, String desc) { | |
28 super(index, name, desc, ComputeType.ADVANCE, null, null); | |
29 } | |
30 | |
31 | |
32 public HistoricalDischargeFacet( | |
33 int index, | |
34 String name, | |
35 String description, | |
36 ComputeType type, | |
37 String stateID, | |
38 String hash | |
39 | |
40 ) { | |
41 super(index, name, description, type, hash, stateID); | |
42 } | |
43 | |
44 | |
45 @Override | |
46 public Facet deepCopy() { | |
47 WaterlevelFacet copy = new WaterlevelFacet(); | |
48 copy.set(this); | |
49 copy.type = type; | |
50 copy.hash = hash; | |
51 copy.stateId = stateId; | |
52 return copy; | |
53 } | |
54 | |
55 | |
56 @Override | |
57 public Object getData(Artifact artifact, CallContext context) { | |
58 if (logger.isDebugEnabled()) { | |
59 logger.debug("Get data for historical discharge curves at index: " + | |
60 index + " / stateId: " + stateId); | |
61 } | |
62 | |
63 FLYSArtifact flys = (FLYSArtifact) artifact; | |
64 | |
65 CalculationResult res = (CalculationResult) | |
66 flys.compute(context, hash, stateId, type, false); | |
67 | |
68 // TODO IMPLEMENT ME | |
69 | |
70 int[] data = new int[] {3, 4}; | |
71 return data; | |
72 } | |
73 } | |
74 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |