9127
|
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 test; |
|
11 |
|
12 import java.io.IOException; |
9148
|
13 import java.util.ArrayList; |
|
14 import java.util.List; |
9127
|
15 |
|
16 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException; |
|
17 import org.dive4elements.river.client.shared.exceptions.ServerException; |
|
18 |
|
19 import test.BerechnungsartenTester.CalcMode; |
|
20 import test.BerechnungsartenTester.FilenameMapper; |
|
21 import test.BerechnungsartenTester.River; |
|
22 |
|
23 /** |
|
24 * @author Domenico Nardi Tironi |
|
25 * |
|
26 */ |
9148
|
27 public class SinfoFlowdepthMinMaxRunner extends AbstractModuleRunner { |
|
28 |
|
29 private final List<String> pairIds = new ArrayList<String>(); |
9127
|
30 |
|
31 public SinfoFlowdepthMinMaxRunner(final String username, final String password, final CalcMode sinfoCalcFlowDepthMinmax, |
|
32 final FilenameMapper helloWorldFile, final double from, final double to, final River beispielfluss) throws ConnectionException, ServerException { |
9148
|
33 super(username, password, AbstractModuleRunner.Infotype.sinfo, sinfoCalcFlowDepthMinmax, helloWorldFile, from, to, beispielfluss); |
|
34 } |
|
35 |
|
36 public void addRecommendationPair(final SimpleRecommendation rec1, final SimpleRecommendation rec2) throws ConnectionException, ServerException { |
|
37 this.pairIds.add(super.getRecommendationPairString(rec1, rec2)); |
9127
|
38 } |
|
39 |
|
40 @Override |
|
41 public void runTest(final boolean exportToFile) throws ServerException, IOException { |
|
42 |
|
43 /* Select River */ |
|
44 super.selectRiver(); |
|
45 |
|
46 /* Select calcmode */ |
|
47 super.selectCalcMode(); |
|
48 |
|
49 /* Select Range */ |
|
50 super.selectRange(); |
|
51 |
|
52 /* Select Fixpunkte */ |
9148
|
53 feedAndGo(extractPairData(this.pairIds, "diffids"), 0); |
9127
|
54 |
|
55 // Describe collection |
|
56 describeCollection(); // wichtig, damit die Facets erzeugt werden |
|
57 |
|
58 // /* Export calculation */ |
|
59 super.export(exportToFile); |
|
60 } |
|
61 } |