Class RelativeToDirectory

Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.io.input.bean.namer.FileNamer>
org.anchoranalysis.io.input.bean.namer.FileNamer
org.anchoranalysis.io.input.bean.namer.FileNamerIndependent
org.anchoranalysis.plugin.io.bean.file.namer.RelativeToDirectory

public class RelativeToDirectory
extends org.anchoranalysis.io.input.bean.namer.FileNamerIndependent
Constructs a name by finding the relative-path between the file and the input-directory.

If no input-directory exists, a name cannot be constructed.

Any directory seperator in the he path is always expressed with forward-slashes, even if backslashes are used by the operating system.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    RelativeToDirectory()  
  • Method Summary

    Modifier and Type Method Description
    protected String deriveName​(File file, Optional<Path> inputDirectory, int index)  

    Methods inherited from class org.anchoranalysis.io.input.bean.namer.FileNamerIndependent

    deriveName

    Methods inherited from class org.anchoranalysis.io.input.bean.namer.FileNamer

    deriveName, deriveNameUnique

    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

    • deriveName

      protected String deriveName​(File file, Optional<Path> inputDirectory, int index) throws org.anchoranalysis.core.exception.CreateException
      Specified by:
      deriveName in class org.anchoranalysis.io.input.bean.namer.FileNamerIndependent
      Throws:
      org.anchoranalysis.core.exception.CreateException