Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/ChartServiceHelper.java @ 8203:238fc722f87a
sed 's/logger/log/g' src/**/*.java
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 13:19:22 +0200 |
parents | ea9eef426962 |
children | 07d51fd4864c 0a5239a1e46e |
comparison
equal
deleted
inserted
replaced
8202:e4606eae8ea5 | 8203:238fc722f87a |
---|---|
23 /** | 23 /** |
24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
25 */ | 25 */ |
26 public class ChartServiceHelper { | 26 public class ChartServiceHelper { |
27 | 27 |
28 private static final Logger logger = | 28 private static final Logger log = |
29 Logger.getLogger(ChartServiceHelper.class); | 29 Logger.getLogger(ChartServiceHelper.class); |
30 | 30 |
31 | 31 |
32 /** The default chart width if no value is specified in the request.*/ | 32 /** The default chart width if no value is specified in the request.*/ |
33 public static final int DEFAULT_CHART_WIDTH = 600; | 33 public static final int DEFAULT_CHART_WIDTH = 600; |
47 * @param req The request document. | 47 * @param req The request document. |
48 * | 48 * |
49 * @return a document to adjust chart settings. | 49 * @return a document to adjust chart settings. |
50 */ | 50 */ |
51 protected static Document getChartAttributes(Map<String, String> req) { | 51 protected static Document getChartAttributes(Map<String, String> req) { |
52 logger.debug("ChartServiceHelper.getChartAttributes"); | 52 log.debug("ChartServiceHelper.getChartAttributes"); |
53 | 53 |
54 Document doc = XMLUtils.newDocument(); | 54 Document doc = XMLUtils.newDocument(); |
55 | 55 |
56 ElementCreator ec = new ElementCreator( | 56 ElementCreator ec = new ElementCreator( |
57 doc, | 57 doc, |
84 protected static void appendChartSize( | 84 protected static void appendChartSize( |
85 Map<String, String> req, | 85 Map<String, String> req, |
86 Element attributes, | 86 Element attributes, |
87 ElementCreator ec) | 87 ElementCreator ec) |
88 { | 88 { |
89 logger.debug("ChartServiceHelper.appendChartSize"); | 89 log.debug("ChartServiceHelper.appendChartSize"); |
90 | 90 |
91 Element size = ec.create("size"); | 91 Element size = ec.create("size"); |
92 | 92 |
93 String width = req.get("width"); | 93 String width = req.get("width"); |
94 String height = req.get("height"); | 94 String height = req.get("height"); |
117 protected static void appendXRange( | 117 protected static void appendXRange( |
118 Map<String, String> req, | 118 Map<String, String> req, |
119 Element attributes, | 119 Element attributes, |
120 ElementCreator ec) | 120 ElementCreator ec) |
121 { | 121 { |
122 logger.debug("ChartServiceHelper.appendXRange"); | 122 log.debug("ChartServiceHelper.appendXRange"); |
123 | 123 |
124 Element range = ec.create("xrange"); | 124 Element range = ec.create("xrange"); |
125 | 125 |
126 String from = req.get("minx"); | 126 String from = req.get("minx"); |
127 String to = req.get("maxx"); | 127 String to = req.get("maxx"); |
147 protected static void appendYRange( | 147 protected static void appendYRange( |
148 Map<String, String> req, | 148 Map<String, String> req, |
149 Element attributes, | 149 Element attributes, |
150 ElementCreator ec) | 150 ElementCreator ec) |
151 { | 151 { |
152 logger.debug("ChartServiceHelper.appendYRange"); | 152 log.debug("ChartServiceHelper.appendYRange"); |
153 | 153 |
154 Element range = ec.create("yrange"); | 154 Element range = ec.create("yrange"); |
155 | 155 |
156 String from = req.get("miny"); | 156 String from = req.get("miny"); |
157 String to = req.get("maxy"); | 157 String to = req.get("maxy"); |
178 Map<String, String> req, | 178 Map<String, String> req, |
179 Element attributes, | 179 Element attributes, |
180 ElementCreator ec | 180 ElementCreator ec |
181 | 181 |
182 ) { | 182 ) { |
183 logger.debug("ChartServiceHelper.appendFormat"); | 183 log.debug("ChartServiceHelper.appendFormat"); |
184 | 184 |
185 String formatStr = req.get("format"); | 185 String formatStr = req.get("format"); |
186 if (formatStr == null || formatStr.length() == 0) { | 186 if (formatStr == null || formatStr.length() == 0) { |
187 return; | 187 return; |
188 } | 188 } |
206 protected static void appendCurrentKm( | 206 protected static void appendCurrentKm( |
207 Map<String, String> req, | 207 Map<String, String> req, |
208 Element attributes, | 208 Element attributes, |
209 ElementCreator ec) | 209 ElementCreator ec) |
210 { | 210 { |
211 logger.debug("ChartServiceHelper.appendCurrentKm"); | 211 log.debug("ChartServiceHelper.appendCurrentKm"); |
212 | 212 |
213 Element currentKm = ec.create("currentKm"); | 213 Element currentKm = ec.create("currentKm"); |
214 | 214 |
215 String km = req.get("km"); | 215 String km = req.get("km"); |
216 | 216 |