8884
|
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 |
|
11 package org.dive4elements.river.artifacts.sinfo.flowdepth; |
|
12 |
|
13 import java.util.HashSet; |
|
14 import java.util.Set; |
|
15 |
|
16 public final class TkhProcessor extends AbstractSInfoProcessor { |
|
17 |
|
18 static String FACET_TKH = "sinfo_flow_depth.tkh"; |
|
19 |
|
20 private static final Set<String> HANDLED_FACET_TYPES = new HashSet<>(); |
|
21 |
|
22 static { |
|
23 HANDLED_FACET_TYPES.add(FACET_TKH); |
|
24 } |
|
25 |
|
26 private static final String I18N_AXIS_LABEL = "sinfo.chart.tkh.section.yaxis.label"; |
|
27 |
|
28 public TkhProcessor() { |
|
29 super(I18N_AXIS_LABEL, HANDLED_FACET_TYPES); |
|
30 } |
|
31 |
|
32 @Override |
|
33 protected double[][] generatePoints(final FlowDepthCalculationResult data, final String facetName) { |
|
34 if (FACET_TKH.contentEquals(facetName)) |
|
35 return data.getTkhPoints(); |
|
36 |
|
37 return super.generatePoints(data, facetName); |
|
38 } |
|
39 } |