Class DirectoryStructure

Object
AnchorBean<PathPrefixer>
PathPrefixer
PathPrefixerAvoidResolve
DirectoryStructure

public class DirectoryStructure extends 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    If false, the folders are ignored, and only the file-name is used in the output
    DirectoryWithPrefix
    outFilePrefixFromPath(NamedPath path, Path root, 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

    • DirectoryStructure

      public DirectoryStructure()
  • Method Details

    • outFilePrefixFromPath

      public DirectoryWithPrefix outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) throws PathPrefixerException
      Specified by:
      outFilePrefixFromPath in class PathPrefixerAvoidResolve
      Throws:
      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)