annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/fixings/FixWaterlevelFacet.java @ 5863:4897a58c8746

River artifacts: Added new copyright headers.
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 14:40:59 +0200
parents 5aa05a7a34b7
children af13ceeba52a
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
6 * documentation coming with Dive4Elements River for details.
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
9 package org.dive4elements.river.artifacts.model.fixings;
3461
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
11 import org.dive4elements.artifactdatabase.state.Facet;
3461
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
13 import org.dive4elements.river.artifacts.model.CalculationResult;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
14 import org.dive4elements.river.artifacts.model.WQKms;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
15 import org.dive4elements.river.artifacts.model.WaterlevelFacet;
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
16
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5644
diff changeset
17 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType;
3461
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18
5644
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 3461
diff changeset
19 /** Waterlevel from fix realize compute. */
3461
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 public class FixWaterlevelFacet
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21 extends WaterlevelFacet
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 public FixWaterlevelFacet() {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 public FixWaterlevelFacet(int index, String name, String description) {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27 super(index, name, description, ComputeType.ADVANCE, null, null);
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 public FixWaterlevelFacet(
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 int index,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 String name,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 String description,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
34 ComputeType type,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
35 String stateID,
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
36 String hash
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
37 ) {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
38 super(index, name, description, type, hash, stateID);
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
39 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
40
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
41 @Override
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
42 protected WQKms [] getWQKms(CalculationResult res) {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
43 FixRealizingResult fr = (FixRealizingResult)res.getData();
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44 return fr != null ? fr.getWQKms() : null;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 /** Copy deeply. */
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
48 @Override
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
49 public Facet deepCopy() {
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
50 FixWaterlevelFacet copy = new FixWaterlevelFacet();
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
51 copy.set(this);
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
52 copy.type = type;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
53 copy.hash = hash;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
54 copy.stateId = stateId;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
55 return copy;
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
56 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
57 }
1481322efc02 FixA: Removed instanceof hack to fetch the WQKms of the fix realizations.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
58 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org