Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkh/WinfoArtifactWrapper.java @ 8914:e3519c3e7a0a
Workflow for SINFO-Transport bodies heights inclduing winfo calculation
author | gernotbelger |
---|---|
date | Tue, 27 Feb 2018 18:06:52 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
8913:924cd9943337 | 8914:e3519c3e7a0a |
---|---|
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.sinfo.tkh; | |
11 | |
12 import java.util.Collection; | |
13 | |
14 import org.dive4elements.artifactdatabase.data.DefaultStateData; | |
15 import org.dive4elements.artifactdatabase.data.StateData; | |
16 import org.dive4elements.river.artifacts.D4EArtifact; | |
17 import org.dive4elements.river.artifacts.WINFOArtifact; | |
18 | |
19 /** | |
20 * Ugly wrapper around WINfoArtifact in order to a) not to break serialization of WInfoArtifact b) be able to copy data | |
21 * into it | |
22 * | |
23 * @author Gernot Belger | |
24 * | |
25 */ | |
26 class WinfoArtifactWrapper extends WINFOArtifact { | |
27 | |
28 private static final long serialVersionUID = 1L; | |
29 | |
30 public WinfoArtifactWrapper(final D4EArtifact dataSource) { | |
31 final Collection<StateData> allData = dataSource.getAllData(); | |
32 for (final StateData stateData : allData) { | |
33 | |
34 final DefaultStateData clonedData = new DefaultStateData(); | |
35 clonedData.set(stateData); | |
36 | |
37 addData(clonedData.getName(), clonedData); | |
38 } | |
39 | |
40 addStringData("calculation_mode", "calc.surface.curve"); | |
41 } | |
42 } |