annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WMSBackgroundState.java @ 5646:14009b194871

Doc, Cosmetics.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 10 Apr 2013 09:36:25 +0200
parents 453d2d0c4258
children
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;
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
10 import org.w3c.dom.Document;
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
11 import org.w3c.dom.Node;
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
12
3302
453d2d0c4258 Organized and added missing imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1926
diff changeset
13 import de.intevation.artifactdatabase.state.Facet;
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;
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
15 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
16 import de.intevation.artifacts.common.utils.XMLUtils;
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
17 import de.intevation.flys.artifacts.FLYSArtifact;
3302
453d2d0c4258 Organized and added missing imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1926
diff changeset
18 import de.intevation.flys.artifacts.model.map.WMSLayerFacet;
954
a5ea28339e5b Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 942
diff changeset
19 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
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
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 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
23
954
a5ea28339e5b Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 942
diff changeset
24 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
25
1066
7f5426c69ee0 The WMS background's facet will now also have a SRID set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1063
diff changeset
26 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
27 "/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
28
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
29 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
30 "/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
31
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
32 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
33 "/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
34
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
35
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
36 protected String url;
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
37 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
38 protected String srid;
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
39
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
40 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
41
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
42 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
43
954
a5ea28339e5b Set the extent of created WMSLayerFacets.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 942
diff changeset
44
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
45 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
46
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
47
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
48 @Override
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
49 public void setup(Node config) {
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
50 super.setup(config);
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
51
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
52 logger.debug("WMSBackgroundState.setup()");
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
53 }
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
54
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
55
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
56 @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
57 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
58 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
59 String hash,
958
ae198bef4ba0 Added configurations for river WMSe (currently for Saar, Mosel, Elbe).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 956
diff changeset
60 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
61 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
62 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
63 ) {
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 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
65
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
66 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
67
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
68 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
69 // 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
70 // 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
71 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
72 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
73 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
74 }
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
75
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
76 if (url == null || layer == null) {
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
77 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
78 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
79 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
80 return null;
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
81 }
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
82
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
83 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
84 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
85 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
86 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
87 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
88 getID(), hash,
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
89 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
90
956
1cf7b4ee7b6d Made the background layer in floodmaps configurable.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 955
diff changeset
91 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
92 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
93
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
94 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
95
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
96 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
97 }
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
98
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
99
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
100 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
101 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
102 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
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 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
106 }
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
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 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
110 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
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 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
113 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
114 }
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
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 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
118 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
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 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
123 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
124 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
125 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
126 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
127 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
128 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
129 }
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
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
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 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
133 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
134 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
135 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
136 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
137 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
138 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
139 }
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
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
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 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
143 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
144 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
145 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
146 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
147 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
148 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
149 }
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
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
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 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
153 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
154 }
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
155 }
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
156 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org