Class DirectoryStructure
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.tifand root=
/a/bthen the prefix would be
c/d/e/
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf false, the folders are ignored, and only the file-name is used in the outputoutFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) Determines the out-file prefix from a path.voidsetIncludeDirectories(boolean includeDirectories) If false, the folders are ignored, and only the file-name is used in the outputvoidsetPrefixToRemove(String prefixToRemove) Methods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve
getPrefix, outFilePrefix, outFilePrefixAvoidResolve, rootDirectoryPrefix, rootDirectoryPrefixAvoidResolve, setPrefixMethods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixer
resolvePath, resolvePathMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
DirectoryStructure
public DirectoryStructure()
-
-
Method Details
-
outFilePrefixFromPath
public DirectoryWithPrefix outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) throws PathPrefixerException Description copied from class:PathPrefixerAvoidResolveDetermines the out-file prefix from a path.- Specified by:
outFilePrefixFromPathin classPathPrefixerAvoidResolve- Parameters:
path- path to calculate prefix from with associated descriptive-nameroot- root of prefixcontext- the path-prefixer context.- Returns:
- folder/filename for prefixing.
- Throws:
PathPrefixerException- if a prefix cannot be successfully derived.
-
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
-
setPrefixToRemove
-