annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeWQFacet.java @ 4260:e4a415773b0a

Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 26 Oct 2012 08:51:08 +0200
parents 49cb65d5932d
children
rev   line source
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import de.intevation.artifactdatabase.state.Facet;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import de.intevation.artifacts.Artifact;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import de.intevation.artifacts.CallContext;
4260
e4a415773b0a Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4241
diff changeset
6 import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 /**
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 */
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 public class HistoricalDischargeWQFacet extends DataFacet {
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 private double value;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 public HistoricalDischargeWQFacet() {
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 }
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
4260
e4a415773b0a Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4241
diff changeset
19 public HistoricalDischargeWQFacet(int index, String name,
e4a415773b0a Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4241
diff changeset
20 String description, ComputeType type, String hash, String stateId,
e4a415773b0a Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4241
diff changeset
21 double value) {
e4a415773b0a Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4241
diff changeset
22
e4a415773b0a Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 4241
diff changeset
23 super(index, name, description, type, hash, stateId);
4241
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 this.value = value;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 }
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 @Override
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 public Facet deepCopy() {
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 HistoricalDischargeWQFacet copy = new HistoricalDischargeWQFacet();
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 copy.set(this);
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 copy.value = value;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 return copy;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 }
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 @Override
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 public Object getData(Artifact artifact, CallContext context) {
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 return value;
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 }
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 }
49cb65d5932d Improved the historical discharge calculation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org