org.openstreetmap.josm.io
Class JpgImporter

java.lang.Object
  extended by org.openstreetmap.josm.io.FileImporter
      extended by org.openstreetmap.josm.io.JpgImporter
All Implemented Interfaces:
java.lang.Comparable<FileImporter>, MapView.LayerChangeListener

public class JpgImporter
extends FileImporter

File importer allowing to import geottaged images (*.jpg files).


Field Summary
static ExtensionFileFilter FILE_FILTER
          The default file filter (only *.jpg files).
static ExtensionFileFilter FILE_FILTER_WITH_FOLDERS
          An alternate file filter that also includes folders.
private  GpxLayer gpx
           
 
Fields inherited from class org.openstreetmap.josm.io.FileImporter
filter
 
Constructor Summary
JpgImporter()
          Constructs a new JpgImporter.
JpgImporter(boolean includeFolders)
          Constructs a new JpgImporter with folders selection, if wanted.
JpgImporter(GpxLayer gpx)
          Constructs a new JpgImporter for the given GPX layer.
 
Method Summary
 boolean acceptFile(java.io.File pathname)
           
private  void addRecursiveFiles(java.util.List<java.io.File> files, java.util.Set<java.lang.String> visitedDirs, java.util.List<java.io.File> sel, ProgressMonitor progressMonitor)
           
 double getPriority()
          Needs to be the last, to avoid problems.
 void importData(java.util.List<java.io.File> sel, ProgressMonitor progressMonitor)
          Needs to be implemented if isBatchImporter() returns true.
 boolean isBatchImporter()
          A batch importer is a file importer that prefers to read multiple files at the same time.
 
Methods inherited from class org.openstreetmap.josm.io.FileImporter
activeLayerChange, compareTo, getBZip2InputStream, getGZipInputStream, importData, importDataHandleExceptions, importDataHandleExceptions, isEnabled, layerAdded, layerRemoved, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gpx

private GpxLayer gpx

FILE_FILTER

public static final ExtensionFileFilter FILE_FILTER
The default file filter (only *.jpg files).


FILE_FILTER_WITH_FOLDERS

public static final ExtensionFileFilter FILE_FILTER_WITH_FOLDERS
An alternate file filter that also includes folders.

Since:
5438
Constructor Detail

JpgImporter

public JpgImporter()
Constructs a new JpgImporter.


JpgImporter

public JpgImporter(boolean includeFolders)
Constructs a new JpgImporter with folders selection, if wanted.

Parameters:
includeFolders - If true, includes folders in the file filter
Since:
5438

JpgImporter

public JpgImporter(GpxLayer gpx)
Constructs a new JpgImporter for the given GPX layer. Folders selection is allowed.

Parameters:
gpx - The GPX layer
Method Detail

acceptFile

public boolean acceptFile(java.io.File pathname)
Overrides:
acceptFile in class FileImporter

importData

public void importData(java.util.List<java.io.File> sel,
                       ProgressMonitor progressMonitor)
                throws java.io.IOException,
                       IllegalDataException
Description copied from class: FileImporter
Needs to be implemented if isBatchImporter() returns true.

Overrides:
importData in class FileImporter
Throws:
java.io.IOException
IllegalDataException

addRecursiveFiles

private void addRecursiveFiles(java.util.List<java.io.File> files,
                               java.util.Set<java.lang.String> visitedDirs,
                               java.util.List<java.io.File> sel,
                               ProgressMonitor progressMonitor)
                        throws java.io.IOException
Throws:
java.io.IOException

isBatchImporter

public boolean isBatchImporter()
Description copied from class: FileImporter
A batch importer is a file importer that prefers to read multiple files at the same time.

Overrides:
isBatchImporter in class FileImporter

getPriority

public double getPriority()
Needs to be the last, to avoid problems.

Overrides:
getPriority in class FileImporter


JOSM