Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WMSLayerFacet.java @ 1095:f465785ed1ae
Refactored the code to fetch the km range/locations into a utility class.
flys-artifacts/trunk@2598 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 26 Aug 2011 14:58:35 +0000 |
parents | b1b0a0b61845 |
children | 1ea7eb72aaa6 |
rev | line source |
---|---|
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts.model; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.util.ArrayList; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.util.List; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
8 import org.w3c.dom.Document; |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
9 import org.w3c.dom.Element; |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
10 import org.w3c.dom.Node; |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
11 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.artifacts.Artifact; |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
13 import de.intevation.artifacts.ArtifactNamespaceContext; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import de.intevation.artifacts.CallContext; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
16 import de.intevation.artifacts.common.utils.XMLUtils; |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
17 import de.intevation.artifacts.common.utils.XMLUtils.ElementCreator; |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
18 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import de.intevation.artifactdatabase.state.DefaultFacet; |
1061
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
20 import de.intevation.artifactdatabase.state.Facet; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 import de.intevation.flys.artifacts.states.DefaultState.ComputeType; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public class WMSLayerFacet extends DefaultFacet { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 protected ComputeType type; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 protected List<String> layers; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 protected String stateId; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 protected String hash; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 protected String url; |
953
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
32 protected String extent; |
1052
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
33 protected String srid; |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 private static final Logger logger = Logger.getLogger(WMSLayerFacet.class); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
1061
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
38 public WMSLayerFacet() { |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
39 } |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
40 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 public WMSLayerFacet(int index, String name, String description) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 this(index, name, description, ComputeType.FEED, null, null); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 public WMSLayerFacet( |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 int index, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 String name, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 String description, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 ComputeType type, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 String stateId, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 String hash |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 ) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 super(index, name, description); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 this.layers = new ArrayList<String>(); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 this.type = type; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 this.stateId = stateId; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 this.hash = hash; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 public WMSLayerFacet( |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 int index, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 String name, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 String description, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 ComputeType type, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 String stateId, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 String hash, |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 String url |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 ) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 this(index, name, description, type, stateId, hash); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 this.url = url; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 public void addLayer(String name) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 if (name != null && name.length() > 0) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 layers.add(name); |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 } |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 |
953
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
85 public void setExtent(String extent) { |
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
86 if (extent != null) { |
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
87 this.extent = extent; |
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
88 } |
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
89 } |
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
90 |
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
91 |
1052
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
92 public void setSrid(String srid) { |
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
93 if (srid != null) { |
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
94 this.srid = srid; |
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
95 } |
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
96 } |
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
97 |
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
98 |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 public Object getData(Artifact artifact, CallContext context) { |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 return null; |
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 } |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
102 |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
103 |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
104 @Override |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
105 public Node toXML(Document doc) { |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
106 ElementCreator ec = new ElementCreator( |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
107 doc, |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
108 ArtifactNamespaceContext.NAMESPACE_URI, |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
109 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
110 |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
111 Element facet = ec.create("facet"); |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
112 ec.addAttr(facet, "description", description, true); |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
113 ec.addAttr(facet, "index", String.valueOf(index), true); |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
114 ec.addAttr(facet, "name", name, true); |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
115 ec.addAttr(facet, "url", url, true); |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
116 ec.addAttr(facet, "layers", layers.get(0), true); |
953
6f8873fca927
WMSLayerFacets can have an extent now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
943
diff
changeset
|
117 ec.addAttr(facet, "extent", extent != null ? extent : "", true); |
1052
eeebf8514c7f
The boundary (extent) for the river axis is determined based on its geometry - this extent is written into the wms facet.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
953
diff
changeset
|
118 ec.addAttr(facet, "srid", srid != null ? srid : "", true); |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
119 |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
120 return facet; |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
121 } |
1061
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
122 |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
123 @Override |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
124 public Facet deepCopy() { |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
125 WMSLayerFacet copy = new WMSLayerFacet(); |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
126 copy.set(this); |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
127 |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
128 copy.type = type; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
129 copy.layers = new ArrayList<String>(layers); |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
130 copy.stateId = stateId; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
131 copy.hash = hash; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
132 copy.url = url; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
133 copy.extent = extent; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
134 copy.srid = srid; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
135 |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
136 return copy; |
b1b0a0b61845
Made facets cloneable with the right type.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
1052
diff
changeset
|
137 } |
942
796c54058dc4
Added artifacts/states for WMS background an river axis and a configuration for the output-defaults.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 } |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
942
diff
changeset
|
139 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |