Class ImageImporter

    • Field Detail

      • URL_START_BAD

        private static final java.util.regex.Pattern URL_START_BAD
        Check if the filename starts with a borked path (File(java.net.URI) drops consecutive / characters).
      • URL_START_GOOD

        private static final java.util.regex.Pattern URL_START_GOOD
        Check for the beginning of a "good" url
      • SUPPORTED_FILE_TYPES

        public static final java.util.List<java.lang.String> SUPPORTED_FILE_TYPES
        The supported image file types on the current system
    • Constructor Detail

      • ImageImporter

        public ImageImporter()
        Constructs a new ImageImporter.
      • ImageImporter

        public ImageImporter​(boolean includeFolders)
        Constructs a new ImageImporter with folders selection, if wanted.
        Parameters:
        includeFolders - If true, includes folders in the file filter
      • ImageImporter

        public ImageImporter​(GpxLayer gpx)
        Constructs a new ImageImporter for the given GPX layer. Folders selection is allowed.
        Parameters:
        gpx - The GPX layer
    • Method Detail

      • acceptFile

        public boolean acceptFile​(java.io.File pathname)
        Description copied from class: FileImporter
        Determines if this file importer accepts the given file.
        Overrides:
        acceptFile in class FileImporter
        Parameters:
        pathname - The file to test
        Returns:
        true if this file importer accepts the given file, false otherwise
      • addRecursiveFiles

        static 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
      • addRecursiveFiles

        static void addRecursiveFiles​(java.util.Set<Options> options,
                                      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
        Returns:
        true if this importer is a batch importer