Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.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 | 8c7433b8656d |
children | fc54202a4b1e |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Fri Sep 05 13:19:22 2014 +0200 @@ -37,7 +37,7 @@ */ public class CapabilitiesParser { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CapabilitiesParser.class); @@ -110,7 +110,7 @@ public static void main(String[] args) { - logger.info("Do static Capabilities request/parsing."); + log.info("Do static Capabilities request/parsing."); String log4jProperties = System.getenv(BaseServletContextListener.LOG4J_PROPERTIES); LoggingConfigurator.init(log4jProperties); @@ -122,14 +122,14 @@ } Capabilities caps = getCapabilities(wmsURL); - logger.debug(caps.toString()); + log.debug(caps.toString()); System.out.println(caps.toString()); } catch (ServerException se) { se.printStackTrace(); } - logger.info("Finished fetching capabiltiies."); + log.info("Finished fetching capabiltiies."); } @@ -139,7 +139,7 @@ try { URL url = new URL(urlStr); - logger.debug("Open connection to url: " + urlStr); + log.debug("Open connection to url: " + urlStr); URLConnection conn = url.openConnection(); conn.connect(); @@ -149,11 +149,11 @@ return parse(is); } catch (MalformedURLException mue) { - logger.warn(mue, mue); + log.warn(mue, mue); throw new ServerException(ERR_MALFORMED_URL); } catch (IOException ioe) { - logger.warn(ioe, ioe); + log.warn(ioe, ioe); } throw new ServerException(ERR_GC_REQUEST_FAILED); @@ -163,7 +163,7 @@ protected static Capabilities parse(InputStream is) throws ServerException { - logger.debug("GCServiceImpl.parseCapabilitiesResponse"); + log.debug("GCServiceImpl.parseCapabilitiesResponse"); Document doc = XMLUtils.parseDocument(is, false); @@ -207,8 +207,8 @@ ContactInformation ci = parseContactInformation(contactInformation); - logger.debug("Found fees: " + fees); - logger.debug("Found access constraints: " + accessConstraints); + log.debug("Found fees: " + fees); + log.debug("Found access constraints: " + accessConstraints); NodeList layerNodes = (NodeList) XMLUtils.xpath( capabilities, @@ -249,8 +249,8 @@ XPathConstants.NODE); if (capabilities == null) { - logger.info("No '/WMS_Capabilities' node found."); - logger.info("Try to find a '/WMT_MS_Capabilities' node."); + log.info("No '/WMS_Capabilities' node found."); + log.info("Try to find a '/WMT_MS_Capabilities' node."); capabilities = (Node) XMLUtils.xpath( doc, @@ -327,7 +327,7 @@ ) { int len = layersNode != null ? layersNode.getLength() : 0; - logger.debug("Node has " + len + " layers."); + log.debug("Node has " + len + " layers."); List<WMSLayer> layers = new ArrayList<WMSLayer>(len); @@ -350,7 +350,7 @@ "Name/text()", XPathConstants.STRING); - logger.debug("Found layer: " + title + "(" + name + ")"); + log.debug("Found layer: " + title + "(" + name + ")"); boolean queryable = true; Node queryableAttr = layerNode.getAttributes().getNamedItem("queryable"); @@ -378,7 +378,7 @@ srsNodes = ((Element) layerNode).getElementsByTagName("CRS"); if (srsNodes.getLength() == 0) { - logger.debug("No explicit SRS for this layer specified."); + log.debug("No explicit SRS for this layer specified."); return null; } } @@ -430,7 +430,7 @@ Matcher m = SRS_PATTERN.matcher(singleSrs); if (m.matches()) { - logger.debug("Found SRS '" + m.group(1) + "'"); + log.debug("Found SRS '" + m.group(1) + "'"); return m.group(1); }