Interface FileOutputMapper

All Known Implementing Classes:
SingleOutputDirMapper

public interface FileOutputMapper
Simple behaviour for mapping file outputs for processor. Rules are simple, set up with a prefix and/or suffix. A prefix is added to the beginning of the file name, a suffix is added either:
  • Suffixes starting with any character other than a period: '.' character are inserted before the last filename extension, if it exists.
  • Suffixes starting with a period: '.' are appended to the filename after the extension.
Version:
0.1 Created 13 Nov 2016:10:33:17
Author:
Carl Wilson carlwilson AT github
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    mapFile(File orig)
    Map an original source file to an output file using the getPrefix() as the file name prefix and get suffix as the suffix.
  • Method Details

    • getPrefix

      String getPrefix()
      Returns:
      the prefix added to the mapped file name
    • getSuffix

      String getSuffix()
      Returns:
      the suffix appended to the mapped name
    • mapFile

      File mapFile(File orig) throws VeraPDFException
      Map an original source file to an output file using the getPrefix() as the file name prefix and get suffix as the suffix. The location of the final file will be subject to the mapping rules of the particular implementation. Note that the file returned won't necessarily exist and will be untested regards write capability and the like.
      Parameters:
      orig -
      Returns:
      the File object for the mapped file.
      Throws:
      VeraPDFException - if there's a problem creating the mapped file