comparison flys-artifacts/src/main/java/de/intevation/flys/exports/AbstractExporter.java @ 2035:3ebbe497d7f7

#252 Set titles in waterlevel exports to named main values if those are existing for given Q values. flys-artifacts/trunk@3504 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 21 Dec 2011 09:17:23 +0000
parents a7c437c9547e
children f73036b991e2
comparison
equal deleted inserted replaced
2034:7bc9293de4e6 2035:3ebbe497d7f7
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 addData(artifactFacet.getData(context)); 127 Object data = artifactFacet.getData(context);
128 prepareData(artifactFacet, data);
129
130 addData(data);
128 } 131 }
129 132
130 133
131 /** 134 /**
132 * Generates an export based on a specified facet. 135 * Generates an export based on a specified facet.
196 } 199 }
197 200
198 201
199 protected String msg(String key, String def) { 202 protected String msg(String key, String def) {
200 return Resources.getMsg(context.getMeta(), key, def); 203 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
201 } 217 }
202 218
203 219
204 /** 220 /**
205 * This method starts CSV creation. It makes use of writeCSVData() which has 221 * This method starts CSV creation. It makes use of writeCSVData() which has

http://dive4elements.wald.intevation.org