Mercurial > dive4elements > river
changeset 1131:effe8f945c93
Create WMSLayerFacets for the WSPLGEN results after we have started a WSPLGEN job.
flys-artifacts/trunk@2646 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 05 Sep 2011 16:08:19 +0000 |
parents | e6dd52342eb7 |
children | f4038b828f85 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java |
diffstat | 3 files changed, 26 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Mon Sep 05 15:29:11 2011 +0000 +++ b/flys-artifacts/ChangeLog Mon Sep 05 16:08:19 2011 +0000 @@ -1,3 +1,12 @@ +2011-09-05 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/model/WSPLGENFacet.java: + Removed. We gonna use the WMSLayerFacet until now. + + * src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java: + Add a WMSLayerFacet after we triggered the Scheduler to start a WSPLGEN + calculation. + 2011-09-05 Ingo Weinzierl <ingo@intevation.de> * doc/conf/mapserver/layer.vm,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENFacet.java Mon Sep 05 15:29:11 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -package de.intevation.flys.artifacts.model; - -import de.intevation.artifactdatabase.state.DefaultFacet; -import de.intevation.artifactdatabase.state.Facet; - -public class WSPLGENFacet extends DefaultFacet { - - public WSPLGENFacet() { - } - - public WSPLGENFacet(int idx, String name, String description) { - super(idx, name, description); - } - - @Override - public Facet deepCopy() { - WSPLGENFacet copy = new WSPLGENFacet(); - copy.set(this); - return copy; - } -} -// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Mon Sep 05 15:29:11 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java Mon Sep 05 16:08:19 2011 +0000 @@ -41,7 +41,7 @@ import de.intevation.flys.artifacts.model.CalculationResult; import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WQKms; -import de.intevation.flys.artifacts.model.WSPLGENFacet; +import de.intevation.flys.artifacts.model.WMSLayerFacet; import de.intevation.flys.artifacts.model.WSPLGENJob; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; import de.intevation.flys.exports.WstWriter; @@ -111,7 +111,22 @@ Scheduler scheduler = Scheduler.getInstance(); scheduler.addJob(job); - facets.add(new WSPLGENFacet(0, FLOODMAP_WSPLGEN, "WSPLGEN")); + String url = FLYSUtils.getXPathString(FLYSUtils.XPATH_MAPSERVER_URL); + url = url + "user-wms"; + + WMSLayerFacet facet = new WMSLayerFacet( + 0, + FLOODMAP_WSPLGEN, + "Ergebnis der WSPLGEN Berechnung", + ComputeType.ADVANCE, + getID(), + hash, + url); + + facet.addLayer(artifact.identifier()); + facet.setSrid(FLYSUtils.getRiverSrid(artifact)); + + facets.add(facet); context.afterCall(CallContext.BACKGROUND);