Class LastDirectoryAsPrefix

Object
AnchorBean<PathPrefixer>
PathPrefixer
PathPrefixerAvoidResolve
LastDirectoryAsPrefix

public class LastDirectoryAsPrefix extends PathPrefixerAvoidResolve
Looks for the last directory-name, and removes it in favour of using it as a prefix on a filename

e.g.

/a/b/c/d/e/somename.tif
instead becomes
/a/b/c/d/e_somename.tif
* @author Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    PathPrefixerAvoidResolve
     
    DirectoryWithPrefix
    outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context)
     
    void
    setDelimiter(String delimiter)
     
    void
    setPrefixer(PathPrefixerAvoidResolve prefixer)
     

    Methods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve

    getPrefix, outFilePrefix, outFilePrefixAvoidResolve, rootDirectoryPrefix, rootDirectoryPrefixAvoidResolve, setPrefix

    Methods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixer

    resolvePath, resolvePath

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • LastDirectoryAsPrefix

      public LastDirectoryAsPrefix()
  • Method Details

    • outFilePrefixFromPath

      public DirectoryWithPrefix outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) throws PathPrefixerException
      Specified by:
      outFilePrefixFromPath in class PathPrefixerAvoidResolve
      Throws:
      PathPrefixerException
    • getPrefixer

      public PathPrefixerAvoidResolve getPrefixer()
    • setPrefixer

      public void setPrefixer(PathPrefixerAvoidResolve prefixer)
    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(String delimiter)