Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/flood_duration/MainValuesArtifactWrapper.java @ 9596:fbfd66e8fb81
Softwaretests...20181219 6.2.2: Sinfo/Ued Haupt-/Extremwerte update for current km, W/Q of selected WSPL initially visible
author | mschaefer |
---|---|
date | Tue, 05 Feb 2019 15:43:27 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9595:9b39cfd39e59 | 9596:fbfd66e8fb81 |
---|---|
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.flood_duration; | |
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.MainValuesArtifact; | |
18 | |
19 /** | |
20 * Ugly wrapper around MainValuesArtifact in order to a) not to break serialization of WInfoArtifact b) be able to copy | |
21 * data into it. | |
22 * | |
23 * @author Matthias Schäfer | |
24 */ | |
25 public final class MainValuesArtifactWrapper extends MainValuesArtifact { | |
26 | |
27 private static final long serialVersionUID = 1L; | |
28 | |
29 public MainValuesArtifactWrapper(final D4EArtifact dataSource) { | |
30 | |
31 final Collection<StateData> allData = dataSource.getAllData(); | |
32 | |
33 for (final StateData stateData : allData) { | |
34 final DefaultStateData clonedData = new DefaultStateData(); | |
35 clonedData.set(stateData); | |
36 addData(clonedData.getName(), clonedData); | |
37 } | |
38 } | |
39 } |