org.openstreetmap.josm.io.session
Class OsmDataSessionExporter

java.lang.Object
  extended by org.openstreetmap.josm.io.session.OsmDataSessionExporter
All Implemented Interfaces:
SessionLayerExporter

public class OsmDataSessionExporter
extends java.lang.Object
implements SessionLayerExporter


Nested Class Summary
private  class OsmDataSessionExporter.LayerSaveAction
           
 
Field Summary
private  javax.swing.JCheckBox export
           
private  javax.swing.JRadioButton include
           
private  OsmDataLayer layer
           
private  javax.swing.JRadioButton link
           
 
Constructor Summary
OsmDataSessionExporter()
           
OsmDataSessionExporter(OsmDataLayer layer)
           
 
Method Summary
protected  void addDataFile(java.io.OutputStream out)
           
 org.w3c.dom.Element export(SessionWriter.ExportSupport support)
          Save meta data to the .jos file.
 java.util.Collection<Layer> getDependencies()
          Return the Layers, this Layer depends on.
 javax.swing.JPanel getExportPanel()
          The GUI for exporting this layer.
 OsmDataSessionExporter newInstance(OsmDataLayer layer)
           
 boolean requiresZip()
          Return true, if some data needs to be included in the zip archive.
 boolean shallExport()
          Return true, if the layer should be included in the list of exported layers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

layer

private OsmDataLayer layer

link

private javax.swing.JRadioButton link

include

private javax.swing.JRadioButton include

export

private javax.swing.JCheckBox export
Constructor Detail

OsmDataSessionExporter

public OsmDataSessionExporter(OsmDataLayer layer)

OsmDataSessionExporter

public OsmDataSessionExporter()
Method Detail

newInstance

public OsmDataSessionExporter newInstance(OsmDataLayer layer)

getDependencies

public java.util.Collection<Layer> getDependencies()
Description copied from interface: SessionLayerExporter
Return the Layers, this Layer depends on.

Specified by:
getDependencies in interface SessionLayerExporter

getExportPanel

public javax.swing.JPanel getExportPanel()
Description copied from interface: SessionLayerExporter
The GUI for exporting this layer.

Specified by:
getExportPanel in interface SessionLayerExporter

shallExport

public boolean shallExport()
Description copied from interface: SessionLayerExporter
Return true, if the layer should be included in the list of exported layers. The user can veto this in the export panel.

Specified by:
shallExport in interface SessionLayerExporter

requiresZip

public boolean requiresZip()
Description copied from interface: SessionLayerExporter
Return 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:
requiresZip in interface SessionLayerExporter

export

public org.w3c.dom.Element export(SessionWriter.ExportSupport support)
                           throws java.io.IOException
Description copied from interface: SessionLayerExporter
Save meta data to the .jos file. Return a layer XML element. Use support to save files in the zip archive as needed.

Specified by:
export in interface SessionLayerExporter
Throws:
java.io.IOException

addDataFile

protected void addDataFile(java.io.OutputStream out)
                    throws java.io.IOException
Throws:
java.io.IOException


JOSM