Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BezugswstFixationFacet.java @ 9438:d2f5375ede26
Replaced own W and Q facets in bundu bzws by subclass of FixWaterlevelFacet, added annotations and datacage
author | mschaefer |
---|---|
date | Mon, 20 Aug 2018 16:05:06 +0200 |
parents | |
children | bb278c927b66 |
comparison
equal
deleted
inserted
replaced
9437:751a3eff6244 | 9438:d2f5375ede26 |
---|---|
1 /** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by | |
3 * Björnsen Beratende Ingenieure GmbH | |
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt | |
5 * | |
6 * This file is Free Software under the GNU AGPL (>=v3) | |
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
8 * documentation coming with Dive4Elements River for details. | |
9 */ | |
10 package org.dive4elements.river.artifacts.bundu.bezugswst; | |
11 | |
12 import java.util.List; | |
13 | |
14 import org.dive4elements.river.artifacts.common.AbstractCalculationExportableResult; | |
15 import org.dive4elements.river.artifacts.model.CalculationResult; | |
16 import org.dive4elements.river.artifacts.model.WQKms; | |
17 import org.dive4elements.river.artifacts.model.fixings.FixWaterlevelFacet; | |
18 import org.dive4elements.river.artifacts.states.DefaultState.ComputeType; | |
19 | |
20 public class BezugswstFixationFacet extends FixWaterlevelFacet { | |
21 | |
22 public BezugswstFixationFacet() { | |
23 } | |
24 | |
25 public BezugswstFixationFacet(final int index, final String name, final String description, final ComputeType type, final String hash, | |
26 final String stateID) { | |
27 super(index, name, description, type, hash, stateID); | |
28 } | |
29 | |
30 @Override | |
31 protected WQKms[] getWQKms(final CalculationResult res) { | |
32 | |
33 final BezugswstCalculationResults results = (BezugswstCalculationResults) res.getData(); | |
34 | |
35 final List<AbstractCalculationExportableResult> resultList = results.getResults(); | |
36 | |
37 if (!resultList.isEmpty()) | |
38 return new WQKms[] { ((BezugswstMainCalculationResult) resultList.get(0)).getWQKms() }; | |
39 return null; | |
40 } | |
41 | |
42 } |