Class PathRegEx
Matches a regex against incoming file-paths to form a prefix for output
Groups (i.e. parentheses) in the regular expression each form a directory in the output
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRegEx()Regular expression to use to match path with at least one group in it.outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) Determines the out-file prefix from a path.voidRegular expression to use to match path with at least one group in it.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
-
PathRegEx
public PathRegEx()
-
-
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.
-
getRegEx
Regular expression to use to match path with at least one group in it.
-