Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java @ 2230:59af81364eb1
Improved the 'historical discharge' calculation: implemented findValueForW().
flys-artifacts/trunk@3872 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 01 Feb 2012 15:41:11 +0000 |
parents | fde3db5e68e8 |
children | 453d2d0c4258 |
rev | line source |
---|---|
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.states; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
3 import java.util.HashMap; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.util.List; |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
5 import java.util.Map; |
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
6 |
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
7 import javax.xml.xpath.XPathConstants; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import org.apache.log4j.Logger; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
11 import org.w3c.dom.Document; |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
12 import org.w3c.dom.Node; |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
13 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.artifacts.CallMeta; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
16 import de.intevation.artifacts.common.utils.Config; |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
17 import de.intevation.artifacts.common.utils.XMLUtils; |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
18 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.artifactdatabase.state.Facet; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 import de.intevation.flys.artifacts.FLYSArtifact; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 import de.intevation.flys.artifacts.model.WMSLayerFacet; |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
23 import de.intevation.flys.artifacts.resources.Resources; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 public class WMSBackgroundState extends OutputState { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
29 public static final String I18N_DESCRIPTION = "floodmap.wmsbackground"; |
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
30 |
1066
7f5426c69ee0
The WMS background's facet will now also have a SRID set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1063
diff
changeset
|
31 public static final String XPATH_SRID = |
7f5426c69ee0
The WMS background's facet will now also have a SRID set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1063
diff
changeset
|
32 "/artifact-database/floodmap/river[@name=$name]/srid/@value"; |
7f5426c69ee0
The WMS background's facet will now also have a SRID set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1063
diff
changeset
|
33 |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
34 public static final String XPATH_WMS_URL = |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
35 "/artifact-database/floodmap/river[@name=$name]/background-wms/@url"; |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
36 |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
37 public static final String XPATH_WMS_LAYER = |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
38 "/artifact-database/floodmap/river[@name=$name]/background-wms/@layers"; |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
39 |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
40 |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
41 protected String url; |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
42 protected String layer; |
1066
7f5426c69ee0
The WMS background's facet will now also have a SRID set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1063
diff
changeset
|
43 protected String srid; |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
44 |
1926
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
45 protected Document cfg; |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
46 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
47 protected Map<String, String> variables; |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
48 |
954
a5ea28339e5b
Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
49 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 private static final Logger logger = Logger.getLogger(WMSBackgroundState.class); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
52 |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
53 @Override |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
54 public void setup(Node config) { |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
55 super.setup(config); |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
56 |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
57 logger.debug("WMSBackgroundState.setup()"); |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
58 } |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
59 |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
60 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 @Override |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 public Object computeInit( |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 FLYSArtifact artifact, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 String hash, |
958
ae198bef4ba0
Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
956
diff
changeset
|
65 Object context, |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 CallMeta meta, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 List<Facet> facets |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 ) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 logger.debug("WMSBackgroundState.computeInit()"); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 |
1926
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
71 initVariables(artifact); |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
72 |
1926
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
73 if (url == null || layer == null) { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
74 // XXX I don't remember why 'srid', 'url' and 'layer' are member |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
75 // variables. I think the reason was buffering those values. |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
76 srid = getSrid(); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
77 url = getUrl(); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
78 layer = getLayer(); |
1063
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
79 } |
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
80 |
e7c1ebfc2701
Repaired xpath expressions for wms srid and background layers that broke after the floodmap config structure changed.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
958
diff
changeset
|
81 if (url == null || layer == null) { |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
82 logger.warn("No background layers currently configured:"); |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
83 logger.warn("... add config for WMS url: " + XPATH_WMS_URL); |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
84 logger.warn("... add config for WMS layer: " + XPATH_WMS_LAYER); |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
85 return null; |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
86 } |
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
87 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 WMSLayerFacet facet = new WMSLayerFacet( |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 0, |
1926
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
90 getFacetType(), |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
91 getTitle(meta), |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 ComputeType.INIT, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 getID(), hash, |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
94 url); |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 |
956
1cf7b4ee7b6d
Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
955
diff
changeset
|
96 facet.addLayer(layer); |
1066
7f5426c69ee0
The WMS background's facet will now also have a SRID set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1063
diff
changeset
|
97 facet.setSrid(srid); |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 facets.add(facet); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 return null; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 } |
1926
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
103 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
104 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
105 protected Document getConfig() { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
106 if (cfg == null) { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
107 cfg = Config.getConfig(); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
108 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
109 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
110 return cfg; |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
111 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
112 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
113 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
114 protected void initVariables(FLYSArtifact artifact) { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
115 String river = artifact.getDataAsString("river"); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
116 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
117 variables = new HashMap<String, String>(); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
118 variables.put("name", river); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
119 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
120 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
121 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
122 protected String getFacetType() { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
123 return FLOODMAP_WMSBACKGROUND; |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
124 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
125 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
126 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
127 protected String getSrid() { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
128 return (String) XMLUtils.xpath( |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
129 getConfig(), |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
130 XPATH_SRID, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
131 XPathConstants.STRING, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
132 null, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
133 variables); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
134 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
135 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
136 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
137 protected String getUrl() { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
138 return (String) XMLUtils.xpath( |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
139 getConfig(), |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
140 XPATH_WMS_URL, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
141 XPathConstants.STRING, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
142 null, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
143 variables); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
144 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
145 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
146 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
147 protected String getLayer() { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
148 return (String) XMLUtils.xpath( |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
149 getConfig(), |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
150 XPATH_WMS_LAYER, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
151 XPathConstants.STRING, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
152 null, |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
153 variables); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
154 } |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
155 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
156 |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
157 protected String getTitle(CallMeta meta) { |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
158 return Resources.getMsg(meta, I18N_DESCRIPTION, I18N_DESCRIPTION); |
fde3db5e68e8
Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1066
diff
changeset
|
159 } |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |