Class DirectoryStructure

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.DirectoryStructure

public class DirectoryStructure
extends org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve
Reuses the directories between a path and its root to form the output - and also the filename.

e.g. for a path=

/a/b/c/d/e.tif
and root=
/a/b
then the prefix would be
c/d/e/
Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    DirectoryStructure()  
  • Method Summary

    Modifier and Type Method Description
    String getPrefixToRemove()  
    boolean isIncludeDirectories()
    If false, the folders are ignored, and only the file-name is used in the output
    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 setIncludeDirectories​(boolean includeDirectories)
    If false, the folders are ignored, and only the file-name is used in the output
    void setPrefixToRemove​(String prefixToRemove)  

    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
    • isIncludeDirectories

      public boolean isIncludeDirectories()
      If false, the folders are ignored, and only the file-name is used in the output
    • setIncludeDirectories

      public void setIncludeDirectories​(boolean includeDirectories)
      If false, the folders are ignored, and only the file-name is used in the output
    • getPrefixToRemove

      public String getPrefixToRemove()
    • setPrefixToRemove

      public void setPrefixToRemove​(String prefixToRemove)