Mercurial > dive4elements > river
changeset 953:6f8873fca927
WMSLayerFacets can have an extent now.
flys-artifacts/trunk@2371 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Jul 2011 12:37:54 +0000 |
parents | 7399401f728c |
children | a5ea28339e5b |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java |
diffstat | 2 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Jul 20 12:34:20 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Jul 20 12:37:54 2011 +0000 @@ -1,3 +1,9 @@ +2011-07-20 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java: + This facet type has a method to set the extent of a WMS layer. The + extent is written to the facets XML node in toXML() as well. + 2011-07-20 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java: Adapted
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java Wed Jul 20 12:34:20 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java Wed Jul 20 12:37:54 2011 +0000 @@ -28,6 +28,7 @@ protected String stateId; protected String hash; protected String url; + protected String extent; private static final Logger logger = Logger.getLogger(WMSLayerFacet.class); @@ -76,6 +77,13 @@ } + public void setExtent(String extent) { + if (extent != null) { + this.extent = extent; + } + } + + public Object getData(Artifact artifact, CallContext context) { return null; } @@ -94,6 +102,7 @@ ec.addAttr(facet, "name", name, true); ec.addAttr(facet, "url", url, true); ec.addAttr(facet, "layers", layers.get(0), true); + ec.addAttr(facet, "extent", extent != null ? extent : "", true); return facet; }