Mercurial > dive4elements > river
changeset 2638:ccad7a6ddaa4
Issue 560.
Added new facet for WSPLGEN layers.
flys-artifacts/trunk@4276 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 19 Apr 2012 11:49:57 +0000 |
parents | baaf7d125c43 |
children | a78dafdd8590 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENLayerFacet.java flys-artifacts/src/main/java/de/intevation/flys/exports/MapGenerator.java flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java |
diffstat | 6 files changed, 80 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Apr 18 11:35:14 2012 +0000 +++ b/flys-artifacts/ChangeLog Thu Apr 19 11:49:57 2012 +0000 @@ -1,3 +1,20 @@ +2012-04-18 Raimund Renkert <raimund.renkert@intevation.de> + + Issue 560. + + * src/main/java/de/intevation/flys/artifacts/model/WSPLGENLayerFacet.java: + New. Facet for WSPLGEN layers. + + * src/main/java/de/intevation/flys/wsplgen/FacetCreator.java: + Create a new WSPLGEN facet when creating uesk layers. + + * src/main/java/de/intevation/flys/utils/MapfileGenerator.java, + src/main/java/de/intevation/flys/exports/MapGenerator.java: + Use WSPLGENLayerFacet to create uesk layer. + + * src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java: + Switch back to false as return value in isQueryable(). + 2012-04-18 Raimund Renkert <raimund.renkert@intevation.de> Issue 560.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java Wed Apr 18 11:35:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java Thu Apr 19 11:49:57 2012 +0000 @@ -150,7 +150,7 @@ public boolean isQueryable() { - return true; + return false; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WSPLGENLayerFacet.java Thu Apr 19 11:49:57 2012 +0000 @@ -0,0 +1,45 @@ +package de.intevation.flys.artifacts.model; + +import de.intevation.flys.artifacts.states.DefaultState.ComputeType; + +public class WSPLGENLayerFacet +extends WMSLayerFacet +{ + public WSPLGENLayerFacet() { + } + + + public WSPLGENLayerFacet(int index, String name, String description) { + this(index, name, description, ComputeType.FEED, null, null); + } + + + public WSPLGENLayerFacet( + int index, + String name, + String description, + ComputeType type, + String stateId, + String hash + ) { + super(index, name, description, type, stateId, hash); + } + + public WSPLGENLayerFacet( + int index, + String name, + String description, + ComputeType type, + String stateId, + String hash, + String url + ) { + super(index, name, description, type, stateId, hash, url); + } + + + @Override + public boolean isQueryable() { + return true; + } +}
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/MapGenerator.java Wed Apr 18 11:35:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/MapGenerator.java Thu Apr 19 11:49:57 2012 +0000 @@ -29,6 +29,7 @@ import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WMSDBLayerFacet; import de.intevation.flys.artifacts.model.WMSLayerFacet; +import de.intevation.flys.artifacts.model.WSPLGENLayerFacet; import de.intevation.flys.utils.GeometryUtils; import de.intevation.flys.utils.MapfileGenerator; import de.intevation.flys.utils.ThemeUtil; @@ -125,12 +126,18 @@ Document attr ) { try { - MapfileGenerator mfg = MapfileGenerator.getInstance(); - mfg.createUeskLayer( - flys, - wms, - ThemeUtil.createWSPLGENStyle(attr), - context); + if(wms instanceof WSPLGENLayerFacet) { + MapfileGenerator mfg = MapfileGenerator.getInstance(); + mfg.createUeskLayer( + flys, + (WSPLGENLayerFacet) wms, + ThemeUtil.createWSPLGENStyle(attr), + context); + } + else { + logger.warn("Cannot create WSPLGEN layer from: " + + wms.getClass()); + } } catch (IOException ioe) { logger.error(ioe, ioe);
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java Wed Apr 18 11:35:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java Thu Apr 19 11:49:57 2012 +0000 @@ -23,6 +23,7 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.LayerInfo; import de.intevation.flys.artifacts.model.WMSLayerFacet; +import de.intevation.flys.artifacts.model.WSPLGENLayerFacet; import de.intevation.flys.artifacts.model.WMSDBLayerFacet; import de.intevation.flys.artifacts.resources.Resources; @@ -369,7 +370,7 @@ */ public void createUeskLayer( FLYSArtifact flys, - WMSLayerFacet wms, + WSPLGENLayerFacet wms, String style, CallContext context ) throws FileNotFoundException, IOException
--- a/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java Wed Apr 18 11:35:14 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/wsplgen/FacetCreator.java Thu Apr 19 11:49:57 2012 +0000 @@ -16,6 +16,7 @@ import de.intevation.flys.artifacts.FLYSArtifact; import de.intevation.flys.artifacts.model.FacetTypes; import de.intevation.flys.artifacts.model.WMSLayerFacet; +import de.intevation.flys.artifacts.model.WSPLGENLayerFacet; import de.intevation.flys.artifacts.resources.Resources; import de.intevation.flys.artifacts.states.DefaultState.ComputeType; import de.intevation.flys.utils.FLYSUtils; @@ -109,7 +110,7 @@ } public void createWSPLGENFacet() { - WMSLayerFacet wsplgen = new WMSLayerFacet( + WSPLGENLayerFacet wsplgen = new WSPLGENLayerFacet( 0, FLOODMAP_WSPLGEN, Resources.getMsg(