Class RemoveExtension
Object
org.anchoranalysis.bean.AnchorBean<org.anchoranalysis.io.input.bean.namer.FileNamer>
org.anchoranalysis.io.input.bean.namer.FileNamer
org.anchoranalysis.plugin.io.bean.file.namer.RemoveExtension
public class RemoveExtension
extends org.anchoranalysis.io.input.bean.namer.FileNamer
Removes extensions from the identifier (but not from the file) and only if the extension
hasn't already been removed upstream.
As an exception, the extension can be retained if there is more than one file with the same identifier.
To check if the extension has already been removed upstream, a check occurs if the path ends with the identifier.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description RemoveExtension()RemoveExtension(org.anchoranalysis.io.input.bean.namer.FileNamer namer) -
Method Summary
Modifier and Type Method Description List<org.anchoranalysis.io.input.file.NamedFile>deriveName(List<File> files, org.anchoranalysis.io.input.file.FileNamerContext context)org.anchoranalysis.io.input.bean.namer.FileNamergetNamer()booleanisPreserveExtensionIfDuplicate()Keeps the extension if the file-name (without the extension) becomes duplicated with another.voidsetNamer(org.anchoranalysis.io.input.bean.namer.FileNamer namer)voidsetPreserveExtensionIfDuplicate(boolean preserveExtensionIfDuplicate)Keeps the extension if the file-name (without the extension) becomes duplicated with another.Methods inherited from class org.anchoranalysis.io.input.bean.namer.FileNamer
deriveName, deriveNameUnique
-
Constructor Details
-
RemoveExtension
public RemoveExtension(org.anchoranalysis.io.input.bean.namer.FileNamer namer) -
RemoveExtension
public RemoveExtension()
-
-
Method Details
-
deriveName
public List<org.anchoranalysis.io.input.file.NamedFile> deriveName(List<File> files, org.anchoranalysis.io.input.file.FileNamerContext context)- Specified by:
deriveNamein classorg.anchoranalysis.io.input.bean.namer.FileNamer
-
getNamer
public org.anchoranalysis.io.input.bean.namer.FileNamer getNamer() -
setNamer
public void setNamer(org.anchoranalysis.io.input.bean.namer.FileNamer namer) -
isPreserveExtensionIfDuplicate
public boolean isPreserveExtensionIfDuplicate()Keeps the extension if the file-name (without the extension) becomes duplicated with another. -
setPreserveExtensionIfDuplicate
public void setPreserveExtensionIfDuplicate(boolean preserveExtensionIfDuplicate)Keeps the extension if the file-name (without the extension) becomes duplicated with another.
-