Class GenericSessionExporter<T extends Layer>
- java.lang.Object
-
- org.openstreetmap.josm.io.session.AbstractSessionExporter<T>
-
- org.openstreetmap.josm.io.session.GenericSessionExporter<T>
-
- Type Parameters:
T- Type of exported layer
- All Implemented Interfaces:
SessionLayerExporter
- Direct Known Subclasses:
GpxTracksSessionExporter,NoteSessionExporter,OsmDataSessionExporter
public abstract class GenericSessionExporter<T extends Layer> extends AbstractSessionExporter<T>
Generic superclass ofOsmDataSessionExporterandGpxTracksSessionExporterlayer exporters.- Since:
- 9470
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classGenericSessionExporter.LayerSaveAction
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringextensionprivate javax.swing.JRadioButtonincludeprivate javax.swing.JRadioButtonlinkprivate java.lang.Stringtypeprivate java.lang.Stringversion-
Fields inherited from class org.openstreetmap.josm.io.session.AbstractSessionExporter
export, layer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGenericSessionExporter(T layer, java.lang.String type, java.lang.String version, java.lang.String extension)Constructs a newGenericSessionExporter.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddDataFile(java.io.OutputStream out)org.w3c.dom.Elementexport(SessionWriter.ExportSupport support)Save meta data to the .jos file.javax.swing.JPanelgetExportPanel()The GUI for exporting this layer.booleanrequiresZip()Return true, if some data needs to be included in the zip archive.-
Methods inherited from class org.openstreetmap.josm.io.session.AbstractSessionExporter
getDependencies, shallExport
-
-
-
-
Constructor Detail
-
GenericSessionExporter
protected GenericSessionExporter(T layer, java.lang.String type, java.lang.String version, java.lang.String extension)
Constructs a newGenericSessionExporter.- Parameters:
layer- layer to exporttype- layer session typeversion- layer session versionextension- data file extension
-
-
Method Detail
-
getExportPanel
public javax.swing.JPanel getExportPanel()
Description copied from interface:SessionLayerExporterThe GUI for exporting this layer.- Returns:
- the export panel
-
export
public org.w3c.dom.Element export(SessionWriter.ExportSupport support) throws java.io.IOException
Description copied from interface:SessionLayerExporterSave meta data to the .jos file. Return a layer XML element. Usesupportto save files in the zip archive as needed.- Parameters:
support- support class providing export utilities- Returns:
- the resulting XML element
- Throws:
java.io.IOException- if any I/O error occurs
-
requiresZip
public boolean requiresZip()
Description copied from interface:SessionLayerExporterReturn true, if some data needs to be included in the zip archive. This decision depends on the user selection in the export panel. If any layer requires zip, the user can only save as .joz. Otherwise both .jos and .joz are possible.- Specified by:
requiresZipin interfaceSessionLayerExporter- Overrides:
requiresZipin classAbstractSessionExporter<T extends Layer>- Returns:
trueif some data needs to be included in the zip archive,falseotherwise.
-
addDataFile
protected abstract void addDataFile(java.io.OutputStream out) throws java.io.IOException
- Throws:
java.io.IOException
-
-