annotate gwt-client/src/main/java/org/dive4elements/river/client/server/CrossSectionKMServiceImpl.java @ 8870:c26fb37899ca

Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui. Also using now the localization info from the server instead of localizing the modules again on the client side.
author gernotbelger
date Wed, 07 Feb 2018 11:59:13 +0100
parents 5e38e2924c07
children 0a5239a1e46e
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;
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 import java.util.ArrayList;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
12 import java.util.HashMap;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
13 import java.util.Map;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
14
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
15 import javax.xml.xpath.XPathConstants;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
16
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
17 import org.w3c.dom.Document;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
18 import org.w3c.dom.Element;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
19 import org.w3c.dom.NodeList;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
20
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
21 import org.apache.log4j.Logger;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
22
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
23 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
24
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
25 import org.dive4elements.artifacts.common.ArtifactNamespaceContext;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
26 import org.dive4elements.artifacts.common.utils.XMLUtils;
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
27
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
28 import org.dive4elements.artifacts.httpclient.exceptions.ConnectionException;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
29 import org.dive4elements.artifacts.httpclient.http.HttpClient;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
30 import org.dive4elements.artifacts.httpclient.http.HttpClientImpl;
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
31
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
32 import org.dive4elements.river.client.shared.exceptions.ServerException;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
33 import org.dive4elements.river.client.client.services.CrossSectionKMService;
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
34
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
35 /**
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
36 * Interact with not documented service.
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
37 */
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
38 public class CrossSectionKMServiceImpl
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
39 extends RemoteServiceServlet
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
40 implements CrossSectionKMService
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
41 {
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
42 private static final Logger log =
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
43 Logger.getLogger(CrossSectionKMServiceImpl.class);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
44
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
45 /** XPath that points to the found cross section measurements. */
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
46 public static final String XPATH_CROSS_SECTIONS
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
47 = "/cross-sections/cross-section";
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
48
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
49 /** The error message key that is thrown if an error occured while getting
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
50 * new data. */
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
51 public static final String ERROR_GET_CROSS_SECTION
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
52 = "error_get_cross_section";
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
53
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
54
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
55 /**
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
56 * Fetches positions (kms) at which measurements for given cross-sections
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
57 * exists.
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
58 *
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
59 * @param data Map of Integer (cross-section-id) to km.
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
60 *
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
61 */
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
62 public Map<Integer,Double[]> getCrossSectionKMs(
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
63 String locale,
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
64 Map<Integer, Double> data,
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
65 int nNeighbours)
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
66 throws ServerException
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
67 {
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
68 log.info("CrossSectionKMService.getCrossSectionKMs");
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
69
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
70 String url = getServletContext().getInitParameter("server-url");
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
71
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
72 Document doc = XMLUtils.newDocument();
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
73
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
74 XMLUtils.ElementCreator ec = new XMLUtils.ElementCreator(
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
75 doc,
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
76 ArtifactNamespaceContext.NAMESPACE_URI,
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
77 ArtifactNamespaceContext.NAMESPACE_PREFIX);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
78 Element crossSection = ec.create("cross-sections");
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
79
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
80 doc.appendChild(crossSection);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
81
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
82 for(Map.Entry<Integer, Double> oneCrossSection : data.entrySet()) {
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
83 Element cs = ec.create("cross-section");
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
84 cs.setAttribute("id", oneCrossSection.getKey().toString());
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
85 cs.setAttribute("km", oneCrossSection.getValue().toString());
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
86 cs.setAttribute("n", Integer.valueOf(nNeighbours).toString());
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
87 crossSection.appendChild(cs);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
88 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
89
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
90 HttpClient client = new HttpClientImpl(url, locale);
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
91 log.debug("Created httpclient");
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
92
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
93 try {
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
94 // Document should contain:
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
95 // crosse-sections:
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
96 // attribute(id), attribute(km) attribute(n)
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
97 Document response = client.callService(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
98 url, "cross-section-km", doc);
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
99 //<cross-sections><cross-section id="1">
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 8203
diff changeset
100 //<line km="19.5" line-id="189"/>...
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
101
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
102 NodeList nodeList = (NodeList) XMLUtils.xpath(response,
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
103 XPATH_CROSS_SECTIONS,
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
104 XPathConstants.NODESET);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
105
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
106 int num = nodeList.getLength();
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
107
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
108 Map<Integer, Double[]> result = new HashMap<Integer, Double[]>();
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
109
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
110 try{
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
111 for (int i = 0; i < num; i++) {
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
112 Element csElement = (Element) nodeList.item(i);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
113
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
114 int idx = Integer.parseInt(csElement.getAttribute("id"));
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
115 ArrayList<Double> kms = new ArrayList<Double>();
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
116
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
117 NodeList lineNodes = csElement.getElementsByTagName("line");
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
118 int numLines = lineNodes.getLength();
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
119 for (int k = 0; k < numLines; k++) {
1434
9115b2a28be1 Fix crosssectionkmservice.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1426
diff changeset
120 Element line = (Element) lineNodes.item(k);
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
121 double d = Double.parseDouble(line.getAttribute("km"));
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
122 kms.add(d);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
123 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
124
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
125 Double[] doubles = new Double[kms.size()];
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
126 kms.toArray(doubles);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
127 result.put(Integer.valueOf(idx), doubles);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
128 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
129 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
130 catch(NumberFormatException nfe) {
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
131 log.error("Response was not parsable");
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
132 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
133
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
134 return result;
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
135 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
136 catch (ConnectionException ce) {
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
137 log.error("ConnectionExsp", ce);
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
138 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
139
8203
238fc722f87a sed 's/logger/log/g' src/**/*.java
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5993
diff changeset
140 log.warn("CrossSectionKMService.getCrossSectionKMS() - FAILED");
1426
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
141 throw new ServerException(ERROR_GET_CROSS_SECTION);
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
142 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
143 }
fc8ff0ed64ca Added client for CrossSectionKMService.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
144 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org