Class NoteImporter
- java.lang.Object
-
- org.openstreetmap.josm.gui.io.importexport.FileImporter
-
- org.openstreetmap.josm.gui.io.importexport.NoteImporter
-
- All Implemented Interfaces:
java.lang.Comparable<FileImporter>
public class NoteImporter extends FileImporter
File importer that reads note dump files (*.osn, .osn.gz, .osn.xz and .osn.bz2)- Since:
- 7538
-
-
Field Summary
Fields Modifier and Type Field Description static ExtensionFileFilter
FILE_FILTER
The Notes file filter (*.osn files).-
Fields inherited from class org.openstreetmap.josm.gui.io.importexport.FileImporter
filter, options
-
-
Constructor Summary
Constructors Constructor Description NoteImporter()
Create an importer for note dump files
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
importData(java.io.File file, ProgressMonitor progressMonitor)
Needs to be implemented if isBatchImporter() returns false.NoteLayer
loadLayer(java.io.InputStream in, java.io.File associatedFile, java.lang.String layerName, ProgressMonitor progressMonitor)
Load note layer from InputStream.-
Methods inherited from class org.openstreetmap.josm.gui.io.importexport.FileImporter
acceptFile, compareTo, getPriority, importData, importDataHandleExceptions, importDataHandleExceptions, isBatchImporter, isEnabled, setEnabled, setOptions
-
-
-
-
Field Detail
-
FILE_FILTER
public static final ExtensionFileFilter FILE_FILTER
The Notes file filter (*.osn files).- Since:
- 13114
-
-
Constructor Detail
-
NoteImporter
public NoteImporter()
Create an importer for note dump files
-
-
Method Detail
-
importData
public void importData(java.io.File file, ProgressMonitor progressMonitor) throws java.io.IOException
Description copied from class:FileImporter
Needs to be implemented if isBatchImporter() returns false.- Overrides:
importData
in classFileImporter
- Parameters:
file
- file to importprogressMonitor
- progress monitor- Throws:
java.io.IOException
- if any I/O error occurs
-
loadLayer
public NoteLayer loadLayer(java.io.InputStream in, java.io.File associatedFile, java.lang.String layerName, ProgressMonitor progressMonitor) throws org.xml.sax.SAXException, java.io.IOException
Load note layer from InputStream.- Parameters:
in
- input streamassociatedFile
- filename of data (can benull
if the stream does not come from a file)layerName
- name of generated layerprogressMonitor
- handler for progress monitoring and canceling- Returns:
- note layer
- Throws:
java.io.IOException
- if any I/O error occursorg.xml.sax.SAXException
- if any SAX error occurs- Since:
- 9746
-
-