Class CollapseFileName

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.io.input.bean.path.DerivePath>
org.anchoranalysis.io.input.bean.path.DerivePath
org.anchoranalysis.plugin.io.bean.path.derive.CollapseFileName

public class CollapseFileName
extends org.anchoranalysis.io.input.bean.path.DerivePath
Removes the file-name from a path, but keeps the directories and preserves the file-extension.

Specifically, a file-path of form somedirectory/somename.ext and converts to somedirectory.ext.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    CollapseFileName()  
  • Method Summary

    Modifier and Type Method Description
    Path deriveFrom​(Path source, boolean debugMode)  
    org.anchoranalysis.io.input.bean.path.DerivePath getDerivePath()
    Called as a delegate to provide a source Path.
    boolean isKeepExtension()
    When true, the extension is appended to the directory.
    void setDerivePath​(org.anchoranalysis.io.input.bean.path.DerivePath derivePath)
    Called as a delegate to provide a source Path.
    void setKeepExtension​(boolean keepExtension)
    When true, the extension is appended to the directory.

    Methods inherited from class org.anchoranalysis.io.input.bean.path.DerivePath

    deriveFrom

    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

    • deriveFrom

      public Path deriveFrom​(Path source, boolean debugMode) throws org.anchoranalysis.io.input.path.DerivePathException
      Specified by:
      deriveFrom in class org.anchoranalysis.io.input.bean.path.DerivePath
      Throws:
      org.anchoranalysis.io.input.path.DerivePathException
    • getDerivePath

      public org.anchoranalysis.io.input.bean.path.DerivePath getDerivePath()
      Called as a delegate to provide a source Path.
    • setDerivePath

      public void setDerivePath​(org.anchoranalysis.io.input.bean.path.DerivePath derivePath)
      Called as a delegate to provide a source Path.
    • isKeepExtension

      public boolean isKeepExtension()
      When true, the extension is appended to the directory.
    • setKeepExtension

      public void setKeepExtension​(boolean keepExtension)
      When true, the extension is appended to the directory.