Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduMinfoArtifactWrapper.java @ 9450:7e1fb8d0cb0d
Bundu bzws calculation nearly completed, some corrections with csv output, started with linking the minfo density calculation
author | mschaefer |
---|---|
date | Wed, 22 Aug 2018 19:12:51 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9449:ba3ad54edbae | 9450:7e1fb8d0cb0d |
---|---|
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.Collection; | |
13 import java.util.Date; | |
14 | |
15 import org.dive4elements.artifactdatabase.data.DefaultStateData; | |
16 import org.dive4elements.artifactdatabase.data.StateData; | |
17 import org.dive4elements.river.artifacts.D4EArtifact; | |
18 | |
19 /** | |
20 * Wrapper around an (bundu) artifact to be extended and used for calculations that expect a MinfoArtifact | |
21 * (BedQualityCalculation) | |
22 * | |
23 * @author Matthias Schäfer | |
24 */ | |
25 public final class BunduMinfoArtifactWrapper extends D4EArtifact { | |
26 | |
27 private static final long serialVersionUID = 1L; | |
28 | |
29 public BunduMinfoArtifactWrapper(final D4EArtifact dataSource, final Date startDay, final Date endDay) { | |
30 | |
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.bed.quality"); | |
41 addStringData("bed_diameter", "d50"); // REMARK we don't need any calculation for d50 but the BedQualityCalculation must have at least one diameter | |
42 addStringData("periods", Long.toString(startDay.getTime()) + "," + Long.toString(endDay.getTime())); | |
43 } | |
44 } |