annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java @ 5484:8f492672d1e5

BedHeightParser: allow white space in km-range
author Tom Gottfried <tom.gottfried@intevation.de>
date Wed, 27 Mar 2013 21:01:13 +0100
parents a2735a4bf75e
children
rev   line source
1926
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import java.util.ArrayList;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import java.util.List;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import org.apache.log4j.Logger;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import org.w3c.dom.Document;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import de.intevation.artifacts.Artifact;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import de.intevation.artifacts.ArtifactFactory;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import de.intevation.artifacts.CallMeta;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import de.intevation.artifactdatabase.state.DefaultOutput;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 import de.intevation.artifactdatabase.state.Facet;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 import de.intevation.artifactdatabase.state.State;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 import de.intevation.flys.artifacts.states.WMSBackgroundState;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 public class ExternalWMSArtifact extends StaticFLYSArtifact {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 public static final String NAME = "external_wms";
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 private static final Logger logger =
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 Logger.getLogger(ExternalWMSArtifact.class);
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 public String getName() {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 return NAME;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 public void setup(
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 String identifier,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 ArtifactFactory factory,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 Object context,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 CallMeta callMeta,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 Document data)
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 logger.info("ExternalWMSArtifact.setup");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 super.setup(identifier, factory, context, callMeta, data);
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46
2748
6717b4725ddf Take advantage of refactorisation.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1982
diff changeset
47 String ids = getDatacageIDValue(data);
1926
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 if (ids != null && ids.length() > 0) {
1982
8afd6a9bb244 Cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1926
diff changeset
50 addStringData("ids", ids);
1926
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 else {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 throw new IllegalArgumentException("No attribute 'ids' found!");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 List<Facet> fs = new ArrayList<Facet>();
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 WMSBackgroundState s = (WMSBackgroundState) getCurrentState(context);
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 s.computeInit(this, hash(), context, callMeta, fs);
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 if (!fs.isEmpty()) {
4497
a2735a4bf75e Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents: 2788
diff changeset
62 addFacets(getCurrentStateId(), fs);
1926
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 protected void initialize(
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69 Artifact artifact,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 Object context,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 CallMeta callMeta)
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73 // do nothing
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 public State getCurrentState(Object cc) {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 State s = new ExternalWMSState(this);
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80
4497
a2735a4bf75e Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents: 2788
diff changeset
81 List<Facet> fs = getFacets(getCurrentStateId());
1926
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83 DefaultOutput o = new DefaultOutput(
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84 "floodmap",
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 "floodmap",
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 "image/png",
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87 fs,
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88 "map");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90 s.getOutputs().add(o);
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92 return s;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
95
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96 /**
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97 * Get a list containing the one and only State.
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98 * @param context ignored.
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 * @return list with one and only state.
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 */
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 protected List<State> getStates(Object context) {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103 ArrayList<State> states = new ArrayList<State>();
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104 states.add(getCurrentState(context));
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106 return states;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
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:
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:
diff changeset
110 public static class ExternalWMSState extends WMSBackgroundState {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
112 protected ExternalWMSArtifact artifact;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
114 protected String ids;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
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:
diff changeset
117 public ExternalWMSState(ExternalWMSArtifact artifact) {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 super();
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 this.artifact = artifact;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
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:
diff changeset
122 protected String getIds() {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
123 if (ids == null || ids.length() == 0) {
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
124 ids = artifact.getDataAsString("ids");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
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:
diff changeset
127 return ids;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
128 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
130 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
131 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:
diff changeset
132 return FLOODMAP_EXTERNAL_WMS;
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
133 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
135 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
136 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:
diff changeset
137 return "";
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
138 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
140 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
141 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:
diff changeset
142 String ids = getIds();
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
143 String[] parts = ids.split(";");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
145 return parts[0];
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
147
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
148 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
149 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:
diff changeset
150 String ids = getIds();
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
151 String[] parts = ids.split(";");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
152
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
153 return parts[1];
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
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:
diff changeset
156 @Override
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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:
diff changeset
158 String ids = getIds();
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
159 String[] parts = ids.split(";");
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
160
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
161 return parts[2];
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
162 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
163 } // end of class ExternalWMSState
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
164 }
fde3db5e68e8 Added a new Artifact to enable users to add external WMS layers to floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
165 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org