Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java @ 1774:092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
flys-artifacts/trunk@3095 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 28 Oct 2011 05:54:25 +0000 |
parents | 1ea7eb72aaa6 |
children | 68d0baa01c1b |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java Thu Oct 27 14:04:04 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java Fri Oct 28 05:54:25 2011 +0000 @@ -9,6 +9,8 @@ import org.w3c.dom.Element; import org.w3c.dom.Node; +import com.vividsolutions.jts.geom.Envelope; + import de.intevation.artifacts.Artifact; import de.intevation.artifacts.ArtifactNamespaceContext; import de.intevation.artifacts.CallContext; @@ -20,6 +22,7 @@ import de.intevation.artifactdatabase.state.Facet; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; +import de.intevation.flys.utils.GeometryUtils; public class WMSLayerFacet @@ -30,7 +33,7 @@ protected String stateId; protected String hash; protected String url; - protected String extent; + protected Envelope extent; protected String srid; @@ -83,13 +86,18 @@ } - public void setExtent(String extent) { + public void setExtent(Envelope extent) { if (extent != null) { this.extent = extent; } } + public Envelope getExtent() { + return extent; + } + + public void setSrid(String srid) { if (srid != null) { this.srid = srid; @@ -97,6 +105,11 @@ } + public String getSrid() { + return srid; + } + + public Object getData(Artifact artifact, CallContext context) { return null; } @@ -115,8 +128,10 @@ 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); ec.addAttr(facet, "srid", srid != null ? srid : "", true); + ec.addAttr(facet, "extent", extent != null + ? GeometryUtils.jtsBoundsToOLBounds(extent) + : "", true); return facet; }