Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/DescribeCollectionServiceImpl.java @ 796:cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
flys-client/trunk@2312 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 08 Jul 2011 08:54:08 +0000 |
parents | 942bd0e7e332 |
children | 374712890b94 |
comparison
equal
deleted
inserted
replaced
795:68b8770af6c5 | 796:cd8603aaa730 |
---|---|
26 import de.intevation.flys.client.shared.model.Collection; | 26 import de.intevation.flys.client.shared.model.Collection; |
27 import de.intevation.flys.client.shared.model.CollectionItem; | 27 import de.intevation.flys.client.shared.model.CollectionItem; |
28 import de.intevation.flys.client.shared.model.DefaultCollection; | 28 import de.intevation.flys.client.shared.model.DefaultCollection; |
29 import de.intevation.flys.client.shared.model.DefaultCollectionItem; | 29 import de.intevation.flys.client.shared.model.DefaultCollectionItem; |
30 import de.intevation.flys.client.shared.model.DefaultFacet; | 30 import de.intevation.flys.client.shared.model.DefaultFacet; |
31 import de.intevation.flys.client.shared.model.DefaultOutputMode; | |
32 import de.intevation.flys.client.shared.model.DefaultTheme; | 31 import de.intevation.flys.client.shared.model.DefaultTheme; |
32 import de.intevation.flys.client.shared.model.ChartMode; | |
33 import de.intevation.flys.client.shared.model.ExportMode; | 33 import de.intevation.flys.client.shared.model.ExportMode; |
34 import de.intevation.flys.client.shared.model.MapMode; | |
34 import de.intevation.flys.client.shared.model.ReportMode; | 35 import de.intevation.flys.client.shared.model.ReportMode; |
35 import de.intevation.flys.client.shared.model.Facet; | 36 import de.intevation.flys.client.shared.model.Facet; |
36 import de.intevation.flys.client.shared.model.OutputMode; | 37 import de.intevation.flys.client.shared.model.OutputMode; |
37 import de.intevation.flys.client.shared.model.Theme; | 38 import de.intevation.flys.client.shared.model.Theme; |
38 import de.intevation.flys.client.shared.model.ThemeList; | 39 import de.intevation.flys.client.shared.model.ThemeList; |
327 Element tmp = (Element)list.item(i); | 328 Element tmp = (Element)list.item(i); |
328 | 329 |
329 String name = tmp.getAttributeNS(uri, "name"); | 330 String name = tmp.getAttributeNS(uri, "name"); |
330 String desc = tmp.getAttributeNS(uri, "description"); | 331 String desc = tmp.getAttributeNS(uri, "description"); |
331 String mime = tmp.getAttributeNS(uri, "mime-type"); | 332 String mime = tmp.getAttributeNS(uri, "mime-type"); |
333 String type = tmp.getAttributeNS(uri, "type"); | |
332 | 334 |
333 if (name.length() == 0) { | 335 if (name.length() == 0) { |
334 System.err.println("Found an invalid output mode."); | 336 System.err.println("Found an invalid output mode."); |
335 continue; | 337 continue; |
336 } | 338 } |
337 | 339 |
338 OutputMode outmode = null; | 340 OutputMode outmode = null; |
339 List<Facet> fs = extractFacets(tmp); | 341 List<Facet> fs = extractFacets(tmp); |
340 | 342 |
341 if (name.indexOf("export") > -1) { | 343 if (type.equals("export")) { |
342 outmode = new ExportMode(name, desc, mime, fs); | 344 outmode = new ExportMode(name, desc, mime, fs); |
343 } | 345 } |
344 else if (name.indexOf("report") > -1) { | 346 else if (type.equals("report")) { |
345 outmode = new ReportMode(name, desc, mime, fs); | 347 outmode = new ReportMode(name, desc, mime, fs); |
346 } | 348 } |
349 else if (type.equals("chart")){ | |
350 outmode = new ChartMode(name, desc, mime, fs); | |
351 } | |
352 else if (type.equals("map")){ | |
353 outmode = new MapMode(name, desc, mime, fs); | |
354 } | |
347 else { | 355 else { |
348 outmode = new DefaultOutputMode(name, desc, mime, fs); | 356 System.err.println("Broken Output mode without type found."); |
357 continue; | |
349 } | 358 } |
350 | 359 |
351 modes.add(outmode); | 360 modes.add(outmode); |
352 } | 361 } |
353 | 362 |