# HG changeset patch # User Ingo Weinzierl # Date 1321458924 0 # Node ID 71139016cd0f2e7d8999e8aa32d95bc059990a2a # Parent efff4305dc05fb27c3196d6fab360200e21a03f9 Avoid WMS layer names that begin with digits to ensure valid WMS GetFeatureInfo responses. flys-artifacts/trunk@3277 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r efff4305dc05 -r 71139016cd0f flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Wed Nov 16 15:53:52 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Nov 16 15:55:24 2011 +0000 @@ -1,3 +1,12 @@ +2011-11-16 Ingo Weinzierl + + * src/main/java/de/intevation/flys/wsplgen/FacetCreator.java, + src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java, + src/main/java/de/intevation/flys/utils/MapfileGenerator.java: Avoid + WMS layer names that begin with digits. This would lead to invalid + WMSGetFeatureInfo responses, where the name of a layer is the name of a + XML node. + 2011-11-16 Felix Wolfsteller * doc/conf/meta-data.xml: Added and use *_wq macros for interpolated diff -r efff4305dc05 -r 71139016cd0f flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java Wed Nov 16 15:53:52 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java Wed Nov 16 15:55:24 2011 +0000 @@ -129,7 +129,7 @@ getID(), hash, getUrl()); - String name = artifact.identifier() + "-" + type; + String name = type + "-" + artifact.identifier(); facet.addLayer(name); facet.setExtent(getExtent()); diff -r efff4305dc05 -r 71139016cd0f flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java Wed Nov 16 15:53:52 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java Wed Nov 16 15:55:24 2011 +0000 @@ -370,7 +370,7 @@ logger.debug("createUeskLayer"); LayerInfo layerinfo = new LayerInfo(); - layerinfo.setName(flys.identifier() + MS_WSPLGEN_POSTFIX); + layerinfo.setName(MS_WSPLGEN_POSTFIX + flys.identifier()); layerinfo.setType("POLYGON"); layerinfo.setDirectory(flys.identifier()); layerinfo.setData(WSPLGEN_RESULT_SHAPE); @@ -434,7 +434,7 @@ } LayerInfo lineInfo = new LayerInfo(); - lineInfo.setName(uuid + MS_LINE_POSTFIX); + lineInfo.setName(MS_LINE_POSTFIX + uuid); lineInfo.setType("LINE"); lineInfo.setDirectory(uuid); lineInfo.setData(WSPLGEN_LINES_SHAPE); @@ -479,7 +479,7 @@ } LayerInfo polygonInfo = new LayerInfo(); - polygonInfo.setName(uuid + MS_POLYGONS_POSTFIX); + polygonInfo.setName(MS_POLYGONS_POSTFIX + uuid); polygonInfo.setType("POLYGON"); polygonInfo.setDirectory(uuid); polygonInfo.setData(WSPLGEN_POLYGONS_SHAPE); @@ -522,7 +522,7 @@ logger.debug("createDatabaseLayer"); LayerInfo layerinfo = new LayerInfo(); - layerinfo.setName(flys.identifier() + "-" + wms.getName()); + layerinfo.setName(wms.getName() + "-" + flys.identifier()); layerinfo.setType(wms.getGeometryType()); layerinfo.setFilter(wms.getFilter()); layerinfo.setData(wms.getData()); diff -r efff4305dc05 -r 71139016cd0f flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java --- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java Wed Nov 16 15:53:52 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java Wed Nov 16 15:55:24 2011 +0000 @@ -116,7 +116,7 @@ } wsplgen.addLayer( - artifact.identifier() + MapfileGenerator.MS_WSPLGEN_POSTFIX); + MapfileGenerator.MS_WSPLGEN_POSTFIX + artifact.identifier()); wsplgen.setSrid(getSrid()); wsplgen.setExtent(bounds); @@ -137,7 +137,7 @@ getUrl()); barriers.addLayer( - artifact.identifier() + MapfileGenerator.MS_BARRIERS_POSTFIX); + MapfileGenerator.MS_BARRIERS_POSTFIX + artifact.identifier()); barriers.setSrid(getSrid()); barriers.setExtent(getBounds());