Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java @ 3746:7bc61f4ab26b
Fix for #837
flys-artifacts/trunk@5431 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Tue, 11 Sep 2012 12:08:08 +0000 |
parents | b0ba96bbf01d |
children | 2fdbe78a8fc2 |
rev | line source |
---|---|
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
3019
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
3 import java.io.File; |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
4 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import java.util.ArrayList; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import java.util.List; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
8 import java.util.regex.Pattern; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
9 import java.util.regex.Matcher; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
10 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import org.w3c.dom.Document; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import org.apache.log4j.Logger; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
15 import org.hibernate.impl.SessionFactoryImpl; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
16 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 import com.vividsolutions.jts.geom.Envelope; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.artifacts.Artifact; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 import de.intevation.artifacts.ArtifactFactory; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 import de.intevation.artifacts.CallMeta; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
3019
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
23 import de.intevation.artifacts.common.utils.FileTools; |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
24 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 import de.intevation.artifactdatabase.data.DefaultStateData; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 import de.intevation.artifactdatabase.state.Facet; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 import de.intevation.artifactdatabase.state.State; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
30 import de.intevation.flys.backend.SessionFactoryProvider; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
31 |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
32 import de.intevation.flys.artifacts.resources.Resources; |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 import de.intevation.flys.artifacts.states.DefaultState; |
3302
453d2d0c4258
Organized and added missing imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
3087
diff
changeset
|
34 import de.intevation.flys.artifacts.model.map.WMSDBLayerFacet; |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
35 import de.intevation.flys.utils.FLYSUtils; |
3019
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
36 import de.intevation.flys.utils.MapfileGenerator; |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 public abstract class WMSDBArtifact extends StaticFLYSArtifact { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 private static final Logger logger = Logger.getLogger(WMSDBArtifact.class); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
43 public static final Pattern DB_URL_PATTERN = |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
44 Pattern.compile("(.*)\\/\\/(.*):([0-9]+)\\/([a-zA-Z]+)"); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
45 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 @Override |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 public void setup( |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 String identifier, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 ArtifactFactory factory, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 Object context, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 CallMeta callMeta, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 Document data) |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 logger.debug("WMSDBArtifact.setup"); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 super.setup(identifier, factory, context, callMeta, data); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 |
2741
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
59 String ids = getDatacageIDValue(data); |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 if (ids != null && ids.length() > 0) { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 addData("ids", new DefaultStateData("ids", null, null, ids)); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 else { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 throw new IllegalArgumentException("No attribute 'ids' found!"); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 List<Facet> fs = new ArrayList<Facet>(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 WMSDBState state = (WMSDBState) getCurrentState(context); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 state.computeInit(this, hash(), context, callMeta, fs); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 if (!fs.isEmpty()) { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 facets.put(getCurrentStateId(), fs); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 @Override |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 protected void initialize( |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 Artifact artifact, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 Object context, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 CallMeta callMeta) |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 // do nothing |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
3019
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
89 @Override |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
90 protected State getState(Object context, String stateID) { |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
91 return getCurrentState(context); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
92 } |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
93 |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
94 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 /** |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 * Get a list containing the one and only State. |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 * @param context ignored. |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 * @return list with one and only state. |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 */ |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 @Override |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 protected List<State> getStates(Object context) { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 ArrayList<State> states = new ArrayList<State>(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 states.add(getCurrentState(context)); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 return states; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 public static abstract class WMSDBState extends DefaultState { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 private static final Logger logger = Logger.getLogger(WMSDBState.class); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 |
2089
0da8874bd378
Added initial state to map artifact to be able to advance and step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2082
diff
changeset
|
113 protected FLYSArtifact artifact; |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 |
2672
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
115 protected String name; |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
116 protected int riverId; |
2672
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
117 |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
118 |
2082
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1917
diff
changeset
|
119 public WMSDBState() {} |
007a8f5ed9f1
Implemented new module "new map".
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1917
diff
changeset
|
120 |
2089
0da8874bd378
Added initial state to map artifact to be able to advance and step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
2082
diff
changeset
|
121 public WMSDBState(FLYSArtifact artifact) { |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 this.artifact = artifact; |
2672
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
123 this.name = null; |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
124 this.riverId = 0; |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 @Override |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 public Object computeInit( |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 FLYSArtifact artifact, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 String hash, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 Object context, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 CallMeta meta, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 List<Facet> facets |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 ) { |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 logger.debug("WMSDBState.computeInit"); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 String type = getFacetType(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 WMSDBLayerFacet facet = new WMSDBLayerFacet( |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 0, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 type, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 getTitle(meta), |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 ComputeType.INIT, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 getID(), hash, |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 getUrl()); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 |
1917
71139016cd0f
Avoid WMS layer names that begin with digits to ensure valid WMS GetFeatureInfo responses.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1876
diff
changeset
|
147 String name = type + "-" + artifact.identifier(); |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 facet.addLayer(name); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 facet.setExtent(getExtent()); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 facet.setSrid(getSrid()); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 facet.setData(getDataString()); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 facet.setFilter(getFilter()); |
1816
5364b86a0880
Improved styles of WMS layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1805
diff
changeset
|
154 facet.setGeometryType(getGeometryType()); |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
155 facet.setConnection(getConnection()); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
156 facet.setConnectionType(getConnectionType()); |
1876
dd467951335c
Added support for labels in Mapserver layers and options to modify its style.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1854
diff
changeset
|
157 facet.setLabelItem(getLabelItem()); |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
158 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
159 facets.add(facet); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
160 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
161 return null; |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
162 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
163 |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
164 /** |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
165 * This method returns a connection string for databases used by |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
166 * Mapserver's Mapfile. |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
167 * |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
168 * @return A connection string for Mapserver. |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
169 */ |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
170 protected String getConnection() { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
171 SessionFactoryImpl sf = (SessionFactoryImpl) |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
172 SessionFactoryProvider.getSessionFactory(); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
173 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
174 String user = SessionFactoryProvider.getUser(sf); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
175 String pass = SessionFactoryProvider.getPass(sf); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
176 String url = SessionFactoryProvider.getURL(sf); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
177 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
178 logger.debug("Parse connection url: " + url); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
179 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
180 Matcher m = DB_URL_PATTERN.matcher(url); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
181 if (!m.matches()) { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
182 logger.warn("Could not parse Connection string."); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
183 return null; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
184 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
185 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
186 logger.debug("Groups for connection string: " + m.groupCount()); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
187 int groups = m.groupCount(); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
188 |
3087
4a76da133144
Removed repeated x.size() calls from for loops.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3019
diff
changeset
|
189 for (int i = 0; i <= groups; i++) { |
1854
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
190 logger.debug("Group " + i + ": " + m.group(i)); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
191 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
192 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
193 String connection = null; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
194 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
195 if (FLYSUtils.isUsingOracle()) { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
196 if (groups < 3) { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
197 logger.warn("Could only partially parse connection string."); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
198 return null; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
199 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
200 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
201 String host = m.group(2); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
202 String port = m.group(3); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
203 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
204 connection = user + "/" + pass + "@" + host; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
205 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
206 else { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
207 if (groups < 4) { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
208 logger.warn("Could only partially parse connection string."); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
209 return null; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
210 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
211 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
212 String host = m.group(2); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
213 String port = m.group(3); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
214 String db = m.group(4); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
215 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
216 StringBuilder sb = new StringBuilder(); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
217 sb.append("dbname=" + db); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
218 sb.append("host='" + host + "'"); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
219 sb.append("port=" + port); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
220 sb.append("password='" + pass + "'"); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
221 sb.append("sslmode=disable"); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
222 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
223 connection = sb.toString(); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
224 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
225 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
226 logger.debug("Created connection: '" + connection + "'"); |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
227 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
228 return connection; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
229 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
230 |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
231 protected String getConnectionType() { |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
232 return FLYSUtils.isUsingOracle() ? "oraclespatial" : "postgis"; |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
233 } |
e372934f0c42
Replaced the dbconnection.include used by Mapserver - these information are provided by LayerInfo objects now, which reduces config overhead.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1816
diff
changeset
|
234 |
1876
dd467951335c
Added support for labels in Mapserver layers and options to modify its style.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1854
diff
changeset
|
235 protected String getLabelItem() { |
dd467951335c
Added support for labels in Mapserver layers and options to modify its style.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1854
diff
changeset
|
236 return null; |
dd467951335c
Added support for labels in Mapserver layers and options to modify its style.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1854
diff
changeset
|
237 } |
dd467951335c
Added support for labels in Mapserver layers and options to modify its style.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1854
diff
changeset
|
238 |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
239 public int getRiverId() { |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
240 if (riverId == 0) { |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
241 String ids = artifact.getDataAsString("ids"); |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
242 String[] parts = ids.split(";"); |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
243 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
244 try { |
3405
b0ba96bbf01d
Use Integer.parseInt() instead of Integer.valueOf() + Autounboxing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3302
diff
changeset
|
245 riverId = Integer.parseInt(parts[0]); |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
246 } |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
247 catch (NumberFormatException nfe) { |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
248 logger.error("Cannot parse river id from '" + parts[0] + "'"); |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
249 } |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
250 } |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
251 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
252 return riverId; |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
253 } |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
254 |
2672
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
255 /** |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
256 * Returns the name of the WMS layer. This method extracts the name |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
257 * from 'ids' data string. It is expected, that the 'ids' string is |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
258 * seperated by ';' and that the name is placed at index 1. |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
259 * |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
260 * @return the name of the WMS layer. |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
261 */ |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
262 public String getName() { |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
263 if (name == null) { |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
264 String ids = artifact.getDataAsString("ids"); |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
265 |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
266 String parts[] = ids != null ? ids.split(";") : null; |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
267 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
268 if (parts != null && parts.length >= 2) { |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
269 name = parts[1]; |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
270 } |
2672
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
271 } |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
272 |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
273 return name; |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
274 } |
5afccab9aac1
Modified floodmap specific datacage configuration and improved WMS hws layer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2089
diff
changeset
|
275 |
2683
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
276 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
277 /** |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
278 * Returns the name of the layer (returned by getName()) or the layer |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
279 * type if the name is empty. The layer type is created by an i18n |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
280 * string of getFacetType(). |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
281 * |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
282 * @param meta A CallMeta used for i18n. |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
283 * |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
284 * @return the name of the layer or its type if name is empty. |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
285 */ |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
286 protected String getTitle(CallMeta meta) { |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
287 String name = getName(); |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
288 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
289 return name != null && name.length() > 0 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
290 ? name |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
291 : Resources.getMsg( |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
292 meta, |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
293 getFacetType(), |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
294 getFacetType()); |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
295 } |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
296 |
f5af3adb3b95
Improved datacage configuration for floodmaps and maps and modified the WMS layer artifacts to support names for layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2672
diff
changeset
|
297 |
3019
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
298 @Override |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
299 public void endOfLife(Artifact owner, Object context) { |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
300 logger.info("Destroy WMSDBState: " + getID()); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
301 |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
302 String p = FLYSUtils.getXPathString(FLYSUtils.XPATH_SHAPEFILE_DIR); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
303 File dir = new File(p, owner.identifier()); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
304 |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
305 if (dir != null && dir.exists()) { |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
306 logger.debug("Try to delete directory '" + dir + "'"); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
307 |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
308 FileTools.deleteRecursive(dir); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
309 MapfileGenerator.getInstance().update(); |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
310 } |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
311 } |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
312 |
484f3dad4bfd
Let Artifacts of type WMSDBArtifact remove produced files and directories when endOfLife() is called.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2763
diff
changeset
|
313 |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
314 protected abstract String getFacetType(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
315 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
316 protected abstract String getUrl(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
317 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
318 protected abstract String getSrid(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
319 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
320 protected abstract Envelope getExtent(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
321 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
322 protected abstract String getFilter(); |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
323 |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
324 protected abstract String getDataString(); |
1816
5364b86a0880
Improved styles of WMS layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1805
diff
changeset
|
325 |
5364b86a0880
Improved styles of WMS layers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1805
diff
changeset
|
326 protected abstract String getGeometryType(); |
1805
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
327 } // end of WMSDBState |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
328 } |
5e9696c32f04
Added datacage config and loaders for KM WMS layer in floodmaps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
329 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |