[Dive4elements-commits] [PATCH] CapabilitiesParse parses the "queryable" attribute of a WMSLayer now (#1253)
Wald Commits
scm-commit at wald.intevation.org
Wed Jun 5 13:13:23 CEST 2013
# HG changeset patch
# User Christian Lins <christian.lins at intevation.de>
# Date 1370430800 -7200
# Node ID 734ba3732bb6dade51e6a583fd7d77864b86f272
# Parent 809c91beee54be1ba337d22f03c6e17cfddef7e7
CapabilitiesParse parses the "queryable" attribute of a WMSLayer now (#1253).
diff -r 809c91beee54 -r 734ba3732bb6 gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Wed Jun 05 12:56:24 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Wed Jun 05 13:13:20 2013 +0200
@@ -344,6 +344,12 @@
logger.debug("Found layer: " + title + "(" + name + ")");
+ boolean queryable = true;
+ Node queryableAttr = layerNode.getAttributes().getNamedItem("queryable");
+ if (queryableAttr != null && queryableAttr.getNodeValue().equals("0")) {
+ queryable = false;
+ }
+
List<String> srs = parseSRS(layerNode);
NodeList layersNodes = (NodeList) XMLUtils.xpath(
@@ -353,7 +359,7 @@
List<WMSLayer> layers = parseLayers(layersNodes, onlineResource);
- return new WMSLayer(onlineResource, title, name, srs, layers);
+ return new WMSLayer(onlineResource, title, name, srs, layers, queryable);
}
diff -r 809c91beee54 -r 734ba3732bb6 gwt-client/src/main/java/org/dive4elements/river/client/shared/model/WMSLayer.java
--- a/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/WMSLayer.java Wed Jun 05 12:56:24 2013 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/shared/model/WMSLayer.java Wed Jun 05 13:13:20 2013 +0200
@@ -22,6 +22,8 @@
protected List<String> srs;
protected List<WMSLayer> layers;
+ protected boolean queryable = true;
+
public WMSLayer() {
layers = new ArrayList<WMSLayer>();
@@ -39,13 +41,15 @@
String title,
String name,
List<String> srs,
- List<WMSLayer> layers
+ List<WMSLayer> layers,
+ boolean queryable
) {
- this.server = server;
- this.title = title;
- this.name = name;
- this.srs = srs;
- this.layers = layers;
+ this.server = server;
+ this.title = title;
+ this.name = name;
+ this.srs = srs;
+ this.layers = layers;
+ this.queryable = queryable;
}
@@ -74,6 +78,11 @@
}
+ public boolean isQueryable() {
+ return queryable;
+ }
+
+
public boolean supportsSrs(String srs) {
if (this.srs == null || this.srs.size() == 0) {
return true;
More information about the Dive4elements-commits
mailing list