Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/AbstractExporter.java @ 2038:f73036b991e2
Bugfix: repaired broken named values in exports - the last solution had bad side effects.
flys-artifacts/trunk@3515 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 21 Dec 2011 15:44:41 +0000 |
parents | 3ebbe497d7f7 |
children | 0318fa6f0844 |
comparison
equal
deleted
inserted
replaced
2037:986820795c3b | 2038:f73036b991e2 |
---|---|
122 if (!isFacetValid(name)) { | 122 if (!isFacetValid(name)) { |
123 logger.warn("Facet '" + name + "' not valid. No output created!"); | 123 logger.warn("Facet '" + name + "' not valid. No output created!"); |
124 return; | 124 return; |
125 } | 125 } |
126 | 126 |
127 Object data = artifactFacet.getData(context); | 127 addData(artifactFacet.getData(context)); |
128 prepareData(artifactFacet, data); | |
129 | |
130 addData(data); | |
131 } | 128 } |
132 | 129 |
133 | 130 |
134 /** | 131 /** |
135 * Generates an export based on a specified facet. | 132 * Generates an export based on a specified facet. |
199 } | 196 } |
200 | 197 |
201 | 198 |
202 protected String msg(String key, String def) { | 199 protected String msg(String key, String def) { |
203 return Resources.getMsg(context.getMeta(), key, def); | 200 return Resources.getMsg(context.getMeta(), key, def); |
204 } | |
205 | |
206 | |
207 /** | |
208 * This method can be used to prepare data items before they are injected | |
209 * into the exporter using <i>addData()</i>. The method in this | |
210 * implementation is empty and doesn't do anything. | |
211 * | |
212 * @param aaf The wrapper for the Artifact and Facet. | |
213 * @param data The data object. | |
214 */ | |
215 protected void prepareData(ArtifactAndFacet aaf, Object data) { | |
216 // override me in subclasses | |
217 } | 201 } |
218 | 202 |
219 | 203 |
220 /** | 204 /** |
221 * This method starts CSV creation. It makes use of writeCSVData() which has | 205 * This method starts CSV creation. It makes use of writeCSVData() which has |