comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java @ 1771:c62ff9e72cea

Restore mapping of state id to facets (revert, rev 3083 and 3088). flys-artifacts/trunk@3092 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 27 Oct 2011 09:32:05 +0000
parents 5d8b3880a553
children a8aa343799a2
comparison
equal deleted inserted replaced
1770:e8a98eee816d 1771:c62ff9e72cea
254 if (list == null || list.size() == 0) { 254 if (list == null || list.size() == 0) {
255 logger.debug("-> No output modes for this state."); 255 logger.debug("-> No output modes for this state.");
256 continue; 256 continue;
257 } 257 }
258 258
259 if (facets == null || facets.size() == 0) { 259 List<Facet> fs = facets.get(stateId);
260
261 if (fs == null || fs.size() == 0) {
260 logger.debug("No facets for previous state found."); 262 logger.debug("No facets for previous state found.");
261 continue; 263 continue;
262 } 264 }
263 265
264 logger.debug("Found " + facets.size() + " facets in previous states."); 266 logger.debug("Found " + fs.size() + " facets in previous states.");
265 267
266 List<Output> generated = generateOutputs(list, facets); 268 List<Output> generated = generateOutputs(list, fs);
267 269
268 ProtocolUtils.appendOutputModes(doc, outs, generated); 270 ProtocolUtils.appendOutputModes(doc, outs, generated);
269 } 271 }
270 272
271 try { 273 try {
274 List<Output> list = cur.getOutputs(); 276 List<Output> list = cur.getOutputs();
275 if (list != null && list.size() > 0) { 277 if (list != null && list.size() > 0) {
276 logger.debug( 278 logger.debug(
277 "Append output modes for current state: " + cur.getID()); 279 "Append output modes for current state: " + cur.getID());
278 280
279 if (facets != null && facets.size() > 0) { 281 List<Facet> fs = facets.get(cur.getID());
280 List<Output> generated = generateOutputs(list, facets); 282
281 283 if (fs != null && fs.size() > 0) {
282 logger.debug("Found " + facets.size() + " current facets."); 284 List<Output> generated = generateOutputs(list, fs);
285
286 logger.debug("Found " + fs.size() + " current facets.");
283 if (!generated.isEmpty()) { 287 if (!generated.isEmpty()) {
284 ProtocolUtils.appendOutputModes( 288 ProtocolUtils.appendOutputModes(
285 doc, outs, generated); 289 doc, outs, generated);
286 } 290 }
287 } 291 }
1282 * 1286 *
1283 * @param facetName name of the facet. 1287 * @param facetName name of the facet.
1284 * @param index index of the facet. 1288 * @param index index of the facet.
1285 */ 1289 */
1286 public int getInitialFacetActivity(String facetName, int index) { 1290 public int getInitialFacetActivity(String facetName, int index) {
1287 return facetName.endsWith("q") 1291 return (facetName.startsWith("longitudinal_section")
1292 && facetName.endsWith("q"))
1288 ? 0 1293 ? 0
1289 : 1; 1294 : 1;
1290 } 1295 }
1291
1292 } 1296 }
1293 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 1297 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org