Mercurial > dive4elements > river
annotate gwt-client/src/main/java/org/dive4elements/river/client/server/ChartServiceHelper.java @ 9726:0a5239a1e46e 3.2.x
Upgrade to Log4j 2
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 02 Mar 2022 10:26:50 +0100 |
parents | 238fc722f87a |
children |
rev | line source |
---|---|
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5993
ea9eef426962
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5861
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5993
ea9eef426962
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5861
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5861
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
172338b1407f
GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5835
821a02bbfb4e
Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5834
diff
changeset
|
9 package org.dive4elements.river.client.server; |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import java.util.Map; |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import org.w3c.dom.Document; |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import org.w3c.dom.Element; |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
9726 | 16 import org.apache.logging.log4j.Logger; |
17 import org.apache.logging.log4j.LogManager; | |
1367
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1351
diff
changeset
|
18 |
5835
821a02bbfb4e
Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5834
diff
changeset
|
19 import org.dive4elements.artifacts.common.ArtifactNamespaceContext; |
821a02bbfb4e
Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5834
diff
changeset
|
20 import org.dive4elements.artifacts.common.utils.XMLUtils; |
821a02bbfb4e
Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5834
diff
changeset
|
21 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 /** |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 */ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 public class ChartServiceHelper { |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
29 private static final Logger log = |
9726 | 30 LogManager.getLogger(ChartServiceHelper.class); |
1367
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1351
diff
changeset
|
31 |
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1351
diff
changeset
|
32 |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 /** The default chart width if no value is specified in the request.*/ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 public static final int DEFAULT_CHART_WIDTH = 600; |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 /** The default chart height if no value is specified in the request.*/ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 public static final int DEFAULT_CHART_HEIGHT = 400; |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 private ChartServiceHelper() { |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 /** |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 * This method returns a document which might contain parameters to adjust |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 * chart settings. The document is created using the information that are |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 * contained in the request object. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 * |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 * @param req The request document. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 * |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 * @return a document to adjust chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 */ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 protected static Document getChartAttributes(Map<String, String> req) { |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
53 log.debug("ChartServiceHelper.getChartAttributes"); |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 Document doc = XMLUtils.newDocument(); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 ElementCreator ec = new ElementCreator( |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 doc, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 ArtifactNamespaceContext.NAMESPACE_URI, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 Element attributes = ec.create("attributes"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 appendChartSize(req, attributes, ec); |
1351
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
65 appendFormat(req, attributes, ec); |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 appendXRange(req, attributes, ec); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 appendYRange(req, attributes, ec); |
2906
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
68 appendCurrentKm(req, attributes, ec); |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 doc.appendChild(attributes); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 return doc; |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 /** |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 * This method extracts the size (width/height) of a chart from request |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 * object and append those values - if they exist - to the attribute |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 * document used to adjust chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 * |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 * @param req The request object that might contain the chart size. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 * @param attributes The attributes element used to adjust chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 * @param ec The ElementCreator that might be used to create new Elements. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 */ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 protected static void appendChartSize( |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 Map<String, String> req, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 Element attributes, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 ElementCreator ec) |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 { |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
90 log.debug("ChartServiceHelper.appendChartSize"); |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 Element size = ec.create("size"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 String width = req.get("width"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 String height = req.get("height"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 if (width == null || height == null) { |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 width = String.valueOf(DEFAULT_CHART_WIDTH); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 height = String.valueOf(DEFAULT_CHART_HEIGHT); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 ec.addAttr(size, "width", width, true); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 ec.addAttr(size, "height", height, true); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 attributes.appendChild(size); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 /** |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 * This method extracts the x range for the chart from request object and |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 * appends those range - if it exists - to the attribute document used to |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 * adjust the chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 * |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 * @param req The request object that might contain the chart size. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 * @param doc The attribute document used to adjust chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 * @param ec The ElementCreator that might be used to create new Elements. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 */ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 protected static void appendXRange( |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 Map<String, String> req, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 Element attributes, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 ElementCreator ec) |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 { |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
123 log.debug("ChartServiceHelper.appendXRange"); |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 Element range = ec.create("xrange"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 String from = req.get("minx"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 String to = req.get("maxx"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 if (from != null && to != null) { |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 ec.addAttr(range, "from", from, true); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 ec.addAttr(range, "to", to, true); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 attributes.appendChild(range); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 /** |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 * This method extracts the x range for the chart from request object and |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 * appends those range - if it exists - to the attribute document used to |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 * adjust the chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 * |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 * @param req The request object that might contain the chart size. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 * @param doc The attribute document used to adjust chart settings. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 * @param ec The ElementCreator that might be used to create new Elements. |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 */ |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 protected static void appendYRange( |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 Map<String, String> req, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 Element attributes, |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 ElementCreator ec) |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 { |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
153 log.debug("ChartServiceHelper.appendYRange"); |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 Element range = ec.create("yrange"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
157 String from = req.get("miny"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
158 String to = req.get("maxy"); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
159 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 if (from != null && to != null) { |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 ec.addAttr(range, "from", from, true); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
162 ec.addAttr(range, "to", to, true); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
163 |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
164 attributes.appendChild(range); |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
165 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
166 } |
1351
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
167 |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
168 |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
169 /** |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
170 * This method extracts the format string from request object and appends |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
171 * those format - if existing - to the attribute document used to adjust |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
172 * the chart settings. |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
173 * |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
174 * @param req The request object that might contain the chart format. |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
175 * @param doc The attribute document used to adjust chart settings. |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
176 * @param ec The ElementCreator that might be used to create new Elements. |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
177 */ |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
178 protected static void appendFormat( |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
179 Map<String, String> req, |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
180 Element attributes, |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
181 ElementCreator ec |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
182 |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
183 ) { |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
184 log.debug("ChartServiceHelper.appendFormat"); |
1351
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
185 |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
186 String formatStr = req.get("format"); |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
187 if (formatStr == null || formatStr.length() == 0) { |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
188 return; |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
189 } |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
190 |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
191 Element format = ec.create("format"); |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
192 ec.addAttr(format, "value", formatStr, true); |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
193 |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
194 attributes.appendChild(format); |
19f621663b7a
Add the format (png, pdf, svg) string into the xml document which is used for querying charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
549
diff
changeset
|
195 } |
2906
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
196 |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
197 |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
198 /** |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
199 * This method extracts the current km for the chart from request object and |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
200 * appends this km - if it exists - to the attribute document used to |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
201 * adjust the chart settings. |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
202 * |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
203 * @param req The request object that might contain the chart size. |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
204 * @param doc The attribute document used to adjust chart settings. |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
205 * @param ec The ElementCreator that might be used to create new Elements. |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
206 */ |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
207 protected static void appendCurrentKm( |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
208 Map<String, String> req, |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
209 Element attributes, |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
210 ElementCreator ec) |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
211 { |
8203
238fc722f87a
sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5993
diff
changeset
|
212 log.debug("ChartServiceHelper.appendCurrentKm"); |
2906
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
213 |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
214 Element currentKm = ec.create("currentKm"); |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
215 |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
216 String km = req.get("km"); |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
217 |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
218 if (km != null) { |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
219 ec.addAttr(currentKm, "km", km, true); |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
220 |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
221 attributes.appendChild(currentKm); |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
222 } |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
223 } |
1780841d79af
Added navigation to fix analysis charts.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1367
diff
changeset
|
224 |
549
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
225 } |
e74bf6bfeeb6
Use the same code to create the attribute document for the chart creation in ChartOutputService and ChartInfoService.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
226 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |