Mercurial > dive4elements > gnv-client
diff gnv/src/main/java/de/intevation/gnv/action/mapviewer/parser/XMLExternalCallParser.java @ 681:15ac78a91d1b
Removed trailing whitespace.
gnv/trunk@852 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 29 Mar 2010 08:04:15 +0000 |
parents | b88e881e8e94 |
children | d49e8695786c |
line wrap: on
line diff
--- a/gnv/src/main/java/de/intevation/gnv/action/mapviewer/parser/XMLExternalCallParser.java Fri Mar 26 09:22:32 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/mapviewer/parser/XMLExternalCallParser.java Mon Mar 29 08:04:15 2010 +0000 @@ -24,12 +24,12 @@ * */ public class XMLExternalCallParser implements ExternalCallParser { - + /** * the logger, used to log exceptions and additonaly information */ private static Logger log = Logger.getLogger(XMLExternalCallParser.class); - + private static String XPATH_GEOMETRY = "/gnviewer/location/data"; private static String XPATH_SRS = "/gnviewer/location/srs"; private static String XPATH_MAPSERVICES_NODESET = "/gnviewer/mapservices/mapservice"; @@ -38,12 +38,12 @@ private static String ATTRIBUTE_NAME = "name"; private static String ATTRIBUTE_TYPE = "type"; private static String ATTRIBUTE_URL = "url"; - + private String geometry = null; private String srs = null; - + private Collection<MapService> mapServices = null; - + private InputStream inputStream = null; /** @@ -75,10 +75,10 @@ XMLUtils xmlUtils = new XMLUtils(); Document document = xmlUtils.readDocument(this.inputStream); if (document != null){ - + this.geometry = xmlUtils.getStringXPath(document, XPATH_GEOMETRY); this.srs = xmlUtils.getStringXPath(document, XPATH_SRS); - NodeList mapservicesNodes = + NodeList mapservicesNodes = xmlUtils.getNodeSetXPath(document, XPATH_MAPSERVICES_NODESET); if (mapservicesNodes != null){ this.mapServices = new ArrayList<MapService>(mapservicesNodes.getLength()); @@ -95,18 +95,18 @@ }else{ log.debug("No Layer given for this Mapservice"); } - MapService mapService = + MapService mapService = new DefaultMapService(mapserviceID, layer, mapserviceType, mapserviceUrl); this.mapServices.add(mapService); } - + }else{ String errMsg = "XML-Document does not contain any Mapservices which are required."; log.error(errMsg); throw new ExternalCallParserException(errMsg); } - + }else{ String errMsg = "XML-Document could not be read from InputStream."; log.error(errMsg); @@ -118,7 +118,7 @@ throw new ExternalCallParserException(errMsg); } } - + /** * This Method extracts all Layers and put them into the Collection. * @param layer @@ -133,9 +133,9 @@ String id = layerNode.getAttribute(ATTRIBUTE_ID); String name = layerNode.getAttribute(ATTRIBUTE_NAME); NodeList localLayerNodes = xmlUtils.getNodeSetXPath(layerNode, XPATH_LAYER); - Layer tmpLayer = new DefaultLayer(id, name, - (localLayerNodes != null && - localLayerNodes.getLength() > 0), + Layer tmpLayer = new DefaultLayer(id, name, + (localLayerNodes != null && + localLayerNodes.getLength() > 0), groupId); layer.add(tmpLayer); if (localLayerNodes != null && localLayerNodes.getLength() > 0){