Class PathMapper


  • public class PathMapper
    extends Object
    A component that maps source data paths to target data paths.

    This class caches results and is thread-safe.

    Since:
    3.2
    Author:
    Derek Hulley
    • Constructor Detail

      • PathMapper

        public PathMapper()
        Default constructor
    • Method Detail

      • lock

        public void lock()
        Locks the instance against further modifications.
      • clear

        public void clear()
      • addPathMap

        public void addPathMap​(String sourcePath,
                               String targetPath)
        Add a path mapping.
        Parameters:
        sourcePath - the source path
        targetPath - the target path
      • getMappedPaths

        public Set<String> getMappedPaths​(String sourcePath)
        Gets the remapped paths for the given source path, excluding any derivative paths i.e. does exact path matching only.
        Parameters:
        sourcePath - the source path
        Returns:
        Returns the target paths (never null)
      • getMappedPathsWithPartialMatch

        public Set<String> getMappedPathsWithPartialMatch​(String sourcePath)
        Gets the remapped paths for the given source path, including any derivative paths i.e. does partial path matching.
        Parameters:
        sourcePath - the source path
        Returns:
        Returns the target paths (never null)
      • isEmpty

        public boolean isEmpty()