annotate artifacts/src/main/java/org/dive4elements/river/exports/process/SedimentLoadLSTAProcessor.java @ 8472:3f505fba522f

(issue1772) Use 0.001km tolarance instead of 0.1 to find matching km. There is no sense to use a define here. I will not write static final double NULLPOINTNULLNULLONE=0.001 if i just want to use that value and not any other value which may make sense in some other place. Using hardcoded values can have its merits and makes the code easier to read.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 18 Nov 2014 15:24:40 +0100
parents 061e85212d25
children
rev   line source
8204
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesanstalt für Gewässerkunde
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
3 *
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
7 */
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
8
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
9 package org.dive4elements.river.exports.process;
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
10
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
11 import org.dive4elements.river.exports.DiagramGenerator;
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
12
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
13 public class SedimentLoadLSTAProcessor extends SedimentLoadLSProcessor{
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
14
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
15 public static final String I18N_YAXIS_LABEL =
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
16 "chart.sedimentload.ls.yaxis.label.tpera";
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
17 public static final String I18N_YAXIS_LABEL_DEFAULT = "[t/a]";
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
18
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
19 @Override
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
20 public boolean canHandle(String facettype) {
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
21 return facettype.startsWith("sedimentload.ls.ta");
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
22 }
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
23
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
24 @Override
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
25 public String getAxisLabel(DiagramGenerator generator) {
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
26 return generator.msg(I18N_YAXIS_LABEL, I18N_YAXIS_LABEL_DEFAULT);
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
27 }
c657ddcf1fa6 Sediment loads at measurement stations and longitudinal sections need different processing and styling for diagrams.
Tom Gottfried <tom@intevation.de>
parents:
diff changeset
28 }

http://dive4elements.wald.intevation.org