Class LastDirectoryAsPrefix

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixer>
org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixer
org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve
org.anchoranalysis.plugin.io.bean.file.path.prefixer.LastDirectoryAsPrefix

public class LastDirectoryAsPrefix
extends org.anchoranalysis.io.output.bean.path.prefixer.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
    LastDirectoryAsPrefix()  
  • Method Summary

    Modifier and Type Method Description
    String getDelimiter()  
    org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve getPrefixer()  
    org.anchoranalysis.io.output.path.prefixer.DirectoryWithPrefix outFilePrefixFromPath​(org.anchoranalysis.io.output.path.prefixer.NamedPath path, Path root, org.anchoranalysis.io.output.path.prefixer.PathPrefixerContext context)  
    void setDelimiter​(String delimiter)  
    void setPrefixer​(org.anchoranalysis.io.output.bean.path.prefixer.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

  • Method Details

    • outFilePrefixFromPath

      public org.anchoranalysis.io.output.path.prefixer.DirectoryWithPrefix outFilePrefixFromPath​(org.anchoranalysis.io.output.path.prefixer.NamedPath path, Path root, org.anchoranalysis.io.output.path.prefixer.PathPrefixerContext context) throws org.anchoranalysis.io.output.path.prefixer.PathPrefixerException
      Specified by:
      outFilePrefixFromPath in class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve
      Throws:
      org.anchoranalysis.io.output.path.prefixer.PathPrefixerException
    • getPrefixer

      public org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve getPrefixer()
    • setPrefixer

      public void setPrefixer​(org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve prefixer)
    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter​(String delimiter)