Class FileAligner<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    Iterable<FileAlignment<T>>

    public class FileAligner<T>
    extends Object
    implements Iterable<FileAlignment<T>>
    Match up (align) files based on full path name. There is a bi-lingual case (source matched with target files) and tri-lingual (new source matched with old source, matched with old target).
    Author:
    HARGRAVEJE
    • Constructor Detail

      • FileAligner

        public FileAligner​(List<FileLikeThing<T>> newFiles,
                           List<FileLikeThing<T>> oldSrcFiles,
                           List<FileLikeThing<T>> oldTrgFiles,
                           URI newRootUri,
                           URI oldSrcRootUri,
                           URI oldTrgRootUri)
        Tri-lingual alignment (new source matched with old source, matched with old target). This method will lower case the file paths by default.
        Parameters:
        newFiles - - new source files
        oldSrcFiles - - old source files (i.e, from previous translation)
        oldTrgFiles - - old target files that match the old source files.
        newRootUri - - root directory of the new source files.
        oldSrcRootUri - - root directory of the old source files.
        oldTrgRootUri - - root directory of the new target files.
      • FileAligner

        public FileAligner​(boolean lowerCase,
                           List<FileLikeThing<T>> newFiles,
                           List<FileLikeThing<T>> oldSrcFiles,
                           List<FileLikeThing<T>> oldTrgFiles,
                           URI newRootUri,
                           URI oldSrcRootUri,
                           URI oldTrgRootUri)
        Tri-lingual alignment (new source matched with old source, matched with old target).
        Parameters:
        lowerCase - - true to lower case file paths before matching, false to leave as-is
        newFiles - - new source files
        oldSrcFiles - - old source files (i.e, from previous translation)
        oldTrgFiles - - old target files that match the old source files.
        newRootUri - - root directory of the new source files.
        oldSrcRootUri - - root directory of the old source files.
        oldTrgRootUri - - root directory of the new target files.
      • FileAligner

        public FileAligner​(List<FileLikeThing<T>> srcFiles,
                           List<FileLikeThing<T>> trgFiles,
                           URI srcRootUri,
                           URI trgRootUri)
        Bi-lingual alignment (match source with target files). This method will lower case the file paths by default.
        Parameters:
        srcFiles - - source files
        trgFiles - - target files
        srcRootUri - - source root directory
        trgRootUri - - target root directory
      • FileAligner

        public FileAligner​(boolean lowerCase,
                           List<FileLikeThing<T>> srcFiles,
                           List<FileLikeThing<T>> trgFiles,
                           URI srcRootUri,
                           URI trgRootUri)
        Bi-lingual alignment (match source with target files)
        Parameters:
        lowerCase - - true to lower case file paths before matching, false to leave as-is.
        srcFiles - - source files
        trgFiles - - target files
        srcRootUri - - source root directory
        trgRootUri - - target root directory