Class Runtastic2GpxParser

java.lang.Object
be.gaudry.model.file.AbstractFileParser<Long>
be.gaudry.model.tools.gps.Runtastic2GpxParser
All Implemented Interfaces:
PropertyChangeListener, EventListener

public class Runtastic2GpxParser extends AbstractFileParser<Long>
set the origine and destination, for each file, extract meta, if dest dir with date (YYYY_MM_DD camera_model) does not exists, create it, copy file, check if dest file exists with same date (add counter after filename if exists) paste file into dest subdir with new name Provided by the broldev.all.ribbon.launcher project.
Since:
1.0 (May 05, 2018), broldev.all.ribbon.launcher 0.0.1-SNAPSHOT dependency
Version:
1.0 (May 05, 2018)
Author:
Steph GAUDRY
  • Field Details

    • destinationRoot

      protected File destinationRoot
    • lonPattern

      Pattern lonPattern
    • latPattern

      Pattern latPattern
    • elePattern

      Pattern elePattern
    • timePattern

      Pattern timePattern
  • Constructor Details

    • Runtastic2GpxParser

      public Runtastic2GpxParser()
  • Method Details

    • setDestinationRoot

      public void setDestinationRoot(File destinationRoot)
    • getErrors

      public Map<File,​Exception> getErrors()
      Returns:
      the errors
    • getTransfered

      public Collection<String> getTransfered()
    • performOnFile

      protected boolean performOnFile(AbstractBrolWorker<Long> bgw, File file, int progressPercent, int subDirDeep)
      Description copied from class: AbstractFileParser
      Do something on each file
      Specified by:
      performOnFile in class AbstractFileParser<Long>
      Parameters:
      bgw - AbstractBrolWorker to perform cancel if needed, and report progress
      file - file to check
      progressPercent - Progress percentage
      subDirDeep - Deep of the directory in comparison with start directory
      Returns:
      true if we must stop the parsing of current directory (ie. if we have a vob file, we don't check the other files in this directory) false otherwise
    • init

      protected void init()
      Description copied from class: AbstractFileParser
      Override this to do some initializations before starting the parsing, like reset errors, etc.
      Overrides:
      init in class AbstractFileParser<Long>
    • addError

      protected void addError(Exception e, File file)