source: josm/trunk/src/org/openstreetmap/josm/io/session/SessionLayerExporter.java@ 8926

Last change on this file since 8926 was 8926, checked in by Don-vip, 9 years ago

javadoc fixes

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.io.session;
3
4import java.awt.Component;
5import java.io.IOException;
6import java.util.Collection;
7
8import org.openstreetmap.josm.gui.layer.Layer;
9import org.openstreetmap.josm.io.session.SessionWriter.ExportSupport;
10import org.w3c.dom.Element;
11
12public interface SessionLayerExporter {
13
14 /**
15 * Return the Layers, this Layer depends on.
16 * @return the layer dependencies
17 */
18 Collection<Layer> getDependencies();
19
20 /**
21 * The GUI for exporting this layer.
22 * @return the export panel
23 */
24 Component getExportPanel();
25
26 /**
27 * Return true, if the layer should be included in the list of exported layers.
28 *
29 * The user can veto this in the export panel.
30 * @return {@code true} if the layer should be included in the list of exported layers, {@code false} otherwise.
31 */
32 boolean shallExport();
33
34 /**
35 * Return true, if some data needs to be included in the zip archive. This decision depends on the user
36 * selection in the export panel.
37 *
38 * If any layer requires zip, the user can only save as .joz. Otherwise both .jos and .joz are possible.
39 * @return {@code true} if some data needs to be included in the zip archive, {@code false} otherwise.
40 */
41 boolean requiresZip();
42
43 /**
44 * Save meta data to the .jos file. Return a layer XML element.
45 * Use <code>support</code> to save files in the zip archive as needed.
46 * @param support support class providing export utilities
47 * @return the resulting XML element
48 * @throws IOException if any I/O error occurs
49 */
50 Element export(ExportSupport support) throws IOException;
51}
Note: See TracBrowser for help on using the repository browser.