Mercurial > dive4elements > river
annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java @ 3977:172d31051316
dummy merge for repo head
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:15:52 +0200 |
parents | c254939fae52 |
children | 529d0e61e70d |
rev | line source |
---|---|
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.artifacts; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
3 import java.util.Collection; |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.util.List; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 import org.apache.log4j.Logger; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import org.w3c.dom.Document; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import org.w3c.dom.Element; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.artifacts.ArtifactNamespaceContext; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import de.intevation.artifacts.CallContext; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
14 import de.intevation.artifactdatabase.data.StateData; |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import de.intevation.artifactdatabase.ProtocolUtils; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import de.intevation.artifactdatabase.state.Facet; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.artifactdatabase.state.Output; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 import de.intevation.artifactdatabase.state.State; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 import de.intevation.artifacts.common.utils.XMLUtils; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 import de.intevation.artifacts.common.utils.XMLUtils.ElementCreator; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
23 /** |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
24 * A basic FLYSArtifact. |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
25 */ |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public abstract class StaticFLYSArtifact extends FLYSArtifact { |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
3050
02254d763bc0
cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2741
diff
changeset
|
28 /** Private logger. */ |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 private static final Logger logger = |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 Logger.getLogger(StaticFLYSArtifact.class); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
2740
64dc2997b2dd
Refactor static xpath, other artifacts will come in a later commit.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1969
diff
changeset
|
32 /** Path to 'ids' (data) in doc that comes from datacage. */ |
64dc2997b2dd
Refactor static xpath, other artifacts will come in a later commit.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1969
diff
changeset
|
33 public static final String XPATH_IDS = "/art:action/art:ids/@value"; |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
35 /** |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
36 * Create description document which includes outputmodes. |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
37 * @param data ignored. |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
38 */ |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 @Override |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 public Document describe(Document data, CallContext cc) { |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 logger.debug("Describe artifact: " + identifier()); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 Document desc = XMLUtils.newDocument(); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 ElementCreator creator = new ElementCreator( |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 desc, |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 ArtifactNamespaceContext.NAMESPACE_URI, |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 Element root = ProtocolUtils.createRootNode(creator); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 desc.appendChild(root); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 |
3937
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
53 Element name = ProtocolUtils.createArtNode( |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
54 creator, "name", |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
55 new String[] { "value" }, |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
56 new String[] { getName() }); |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
57 |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
58 root.appendChild(name); |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
59 |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 ProtocolUtils.appendDescribeHeader(creator, root, identifier(), hash()); |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
937
diff
changeset
|
61 root.appendChild(createOutputModes(cc, desc, creator)); |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
63 // Add the data to an anonymous state. |
3920
8483d190b2e7
Convert FKYSArtifact data member to a private variable
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3076
diff
changeset
|
64 Collection<StateData> datas = getAllData(); |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
65 if (datas.size() > 0) { |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
66 Element ui = creator.create("ui"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
67 Element staticE = creator.create("static"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
68 Element state = creator.create("state"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
69 ui.appendChild(staticE); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
70 staticE.appendChild(state); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
71 root.appendChild(ui); |
3076
5642a83420f2
FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3050
diff
changeset
|
72 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
73 for (StateData dataItem : datas) { |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
74 Element itemelent = creator.create("data"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
75 creator.addAttr(itemelent, "name", dataItem.getName(), true); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
76 creator.addAttr(itemelent, "type", dataItem.getType(), true); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
77 state.appendChild(itemelent); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
78 Element valuement = creator.create("item"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
79 creator.addAttr(valuement, "label", dataItem.getDescription(), true); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
80 creator.addAttr(valuement, "value", dataItem.getValue().toString(), true); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
81 itemelent.appendChild(valuement); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
82 } |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
83 } |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
84 |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 return desc; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
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
|
89 /** |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
90 * Return the value of id element in Datacage data document. |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
91 * @param data Document as passed by datacage. |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
92 * @return the id element value of data document. |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
93 */ |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
94 public static String getDatacageIDValue(Document data) { |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
95 return XMLUtils.xpathString(data, XPATH_IDS, |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
96 ArtifactNamespaceContext.INSTANCE); |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
97 } |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
98 |
0251393f037c
Refactor usage of now static xpath, other artifacts will follow in later commits.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2740
diff
changeset
|
99 |
3921
deff2c337111
Mark createOutputModes as private
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3920
diff
changeset
|
100 private Element createOutputModes( |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
937
diff
changeset
|
101 CallContext cc, |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
937
diff
changeset
|
102 Document doc, |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
937
diff
changeset
|
103 ElementCreator creator) |
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
937
diff
changeset
|
104 { |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 Element outs = ProtocolUtils.createArtNode( |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 creator, "outputmodes", null, null); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 State state = getCurrentState(cc); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 List<Output> list = state.getOutputs(); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 if (list != null && list.size() > 0) { |
1771
c62ff9e72cea
Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1765
diff
changeset
|
112 List<Facet> fs = facets.get(state.getID()); |
c62ff9e72cea
Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1765
diff
changeset
|
113 if (fs != null && fs.size() > 0) { |
c62ff9e72cea
Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1765
diff
changeset
|
114 List<Output> generated = generateOutputs(list, fs); |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 |
1771
c62ff9e72cea
Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1765
diff
changeset
|
116 logger.debug("Found " + fs.size() + " current facets."); |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 if (!generated.isEmpty()) { |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 ProtocolUtils.appendOutputModes( |
943
5de90b0cff8e
The WMSLayerFacet now writes the WMS URL and layernames to its XML representation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
937
diff
changeset
|
119 doc, outs, generated); |
937
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 else { |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 logger.debug("No facets found for the current state."); |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 return outs; |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |