Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/utils/MapfileGenerator.java @ 730:452fad121560
Implemented code for changing the title of a wms layer (issue198).
gnv-artifacts/trunk@768 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 15 Mar 2010 11:13:21 +0000 |
parents | 9ba6bb85d6dd |
children | 9a828e5a2390 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/utils/MapfileGenerator.java Mon Mar 15 09:23:56 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/utils/MapfileGenerator.java Mon Mar 15 11:13:21 2010 +0000 @@ -51,6 +51,7 @@ public static final String XPATH_LAYER = "/art:meta/art:layer"; public static final String XPATH_LAYER_NAME = "art:name"; + public static final String XPATH_LAYER_TITLE = "art:title"; public static final String XPATH_LAYER_TYPE = "art:type"; public static final String XPATH_LAYER_DATA = "art:data"; public static final String XPATH_LAYER_STATUS = "art:status"; @@ -304,6 +305,14 @@ info.setName(name); } + String title = parseLayerAttr(layer, XPATH_LAYER_TITLE); + if (title != null && !title.equals("")) { + info.setTitle(title); + } + else { + info.setTitle(name); + } + String model = parseLayerAttr(layer, XPATH_LAYER_MODEL); if (model != null && !model.equals("")) { info.setModel(model);