Mercurial > dive4elements > river
annotate artifacts/src/main/java/org/dive4elements/river/artifacts/StaticD4EArtifact.java @ 7397:8ba53c5b86a7
issue1512: improved i18n for flow velocity measurement facets.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 18 Oct 2013 12:20:55 +0200 |
parents | 760ea7f08455 |
children | 8d5ca5175038 |
rev | line source |
---|---|
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
2 * Software engineering by Intevation GmbH |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
3 * |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5975
diff
changeset
|
4 * This file is Free Software under the GNU AGPL (>=v3) |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the |
5994
af13ceeba52a
Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5975
diff
changeset
|
6 * documentation coming with Dive4Elements River for details. |
5863
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
7 */ |
4897a58c8746
River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5838
diff
changeset
|
8 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
9 package org.dive4elements.river.artifacts; |
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
|
10 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
11 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
|
12 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
|
13 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 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
|
15 |
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 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
|
17 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
|
18 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
19 import org.dive4elements.artifacts.ArtifactNamespaceContext; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
20 import org.dive4elements.artifacts.CallContext; |
6138
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
21 import org.dive4elements.artifacts.ArtifactFactory; |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
22 import org.dive4elements.artifacts.CallMeta; |
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
|
23 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
24 import org.dive4elements.artifactdatabase.data.StateData; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
25 import org.dive4elements.artifactdatabase.ProtocolUtils; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
26 import org.dive4elements.artifactdatabase.state.Facet; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
27 import org.dive4elements.artifactdatabase.state.Output; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
28 import org.dive4elements.artifactdatabase.state.State; |
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 |
5831
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
30 import org.dive4elements.artifacts.common.utils.XMLUtils; |
bd047b71ab37
Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4498
diff
changeset
|
31 import org.dive4elements.artifacts.common.utils.XMLUtils.ElementCreator; |
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
|
32 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
33 /** |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
34 * A basic D4EArtifact. |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
35 */ |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
36 public abstract class StaticD4EArtifact extends D4EArtifact { |
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
|
37 |
3050
02254d763bc0
cosmetics.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
2741
diff
changeset
|
38 /** 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
|
39 private static final Logger logger = |
5867
59ff03ff48f1
River artifacts: Renamed FLYSArtifact(Collection) to D4EArtifact(Collection).
Sascha L. Teichmann <teichmann@intevation.de>
parents:
5863
diff
changeset
|
40 Logger.getLogger(StaticD4EArtifact.class); |
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
|
41 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
42 /** |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
43 * Create description document which includes outputmodes. |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
44 * @param data ignored. |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
45 */ |
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
|
46 @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
|
47 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
|
48 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
|
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 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
|
51 |
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 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
|
53 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
|
54 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
|
55 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
|
56 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 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
|
58 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
|
59 |
3937
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
60 Element name = ProtocolUtils.createArtNode( |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
61 creator, "name", |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
62 new String[] { "value" }, |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
63 new String[] { getName() }); |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
64 |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
65 root.appendChild(name); |
c254939fae52
Also add the name to the artifact description
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
3921
diff
changeset
|
66 |
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
|
67 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
|
68 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
|
69 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
70 // 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
|
71 Collection<StateData> datas = getAllData(); |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
72 if (datas.size() > 0) { |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
73 Element ui = creator.create("ui"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
74 Element staticE = creator.create("static"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
75 Element state = creator.create("state"); |
3076
5642a83420f2
FLYS artifacts: Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
3050
diff
changeset
|
76 |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
77 for (StateData dataItem : datas) { |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
78 Element itemelent = creator.create("data"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
79 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
|
80 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
|
81 Element valuement = creator.create("item"); |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
82 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
|
83 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
|
84 itemelent.appendChild(valuement); |
7350
760ea7f08455
Reorder generation of static part of describe document for fast XML DOM handling.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6144
diff
changeset
|
85 state.appendChild(itemelent); |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
86 } |
7350
760ea7f08455
Reorder generation of static part of describe document for fast XML DOM handling.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6144
diff
changeset
|
87 |
760ea7f08455
Reorder generation of static part of describe document for fast XML DOM handling.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6144
diff
changeset
|
88 ui.appendChild(staticE); |
760ea7f08455
Reorder generation of static part of describe document for fast XML DOM handling.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6144
diff
changeset
|
89 staticE.appendChild(state); |
760ea7f08455
Reorder generation of static part of describe document for fast XML DOM handling.
Sascha L. Teichmann <teichmann@intevation.de>
parents:
6144
diff
changeset
|
90 root.appendChild(ui); |
1969
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
91 } |
baefcfba97aa
Add data items to StaticFLYSArtifacts description document.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1771
diff
changeset
|
92 |
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
|
93 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
|
94 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 |
4156
529d0e61e70d
Change visibility of createOutputModes to protected.
Björn Ricks <bjoern.ricks@intevation.de>
parents:
3937
diff
changeset
|
97 protected 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
|
98 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
|
99 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
|
100 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
|
101 { |
4498
04f144c42da5
Improve debugging in StaticFLYSArtifact
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4497
diff
changeset
|
102 logger.debug("createOutputModes"); |
04f144c42da5
Improve debugging in StaticFLYSArtifact
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4497
diff
changeset
|
103 |
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
|
104 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
|
105 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
|
106 |
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 State state = getCurrentState(cc); |
4498
04f144c42da5
Improve debugging in StaticFLYSArtifact
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4497
diff
changeset
|
108 |
04f144c42da5
Improve debugging in StaticFLYSArtifact
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4497
diff
changeset
|
109 logger.debug("Current state is " + state.getID()); |
04f144c42da5
Improve debugging in StaticFLYSArtifact
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4497
diff
changeset
|
110 |
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
|
111 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
|
112 |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 if (list != null && list.size() > 0) { |
4497
a2735a4bf75e
Change facets member variable to private
Björn Ricks <bjoern.ricks@intevation.de>
parents:
4156
diff
changeset
|
114 List<Facet> fs = getFacets(state.getID()); |
1771
c62ff9e72cea
Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1765
diff
changeset
|
115 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
|
116 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
|
117 |
1771
c62ff9e72cea
Restore mapping of state id to facets (revert, rev 3083 and 3088).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1765
diff
changeset
|
118 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
|
119 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
|
120 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
|
121 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
|
122 } |
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 } |
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 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
|
125 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
|
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 } |
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 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
|
130 } |
6138
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
131 |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
132 @Override |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
133 public void setup( |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
134 String identifier, |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
135 ArtifactFactory factory, |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
136 Object context, |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
137 CallMeta callMeta, |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
138 Document data) |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
139 { |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
140 logger.debug("StaticD4EArtifact.setup"); |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
141 super.setup(identifier, factory, context, callMeta, data); |
1d690acf1fdb
Add debug output in static d4e artifact ctor
Andre Heinecke <aheinecke@intevation.de>
parents:
5994
diff
changeset
|
142 } |
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
|
143 } |
9e813e9137a5
Added a monitor that creates new artifacts for default themes in charts and maps.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |