Package org.verapdf.core.utils
Class SingleOutputDirMapper
- java.lang.Object
-
- org.verapdf.core.utils.SingleOutputDirMapper
-
- All Implemented Interfaces:
FileOutputMapper
public class SingleOutputDirMapper extends Object
- Version:
- 0.1 Created 16 Nov 2016:07:19:45
- Author:
- Carl Wilson carlwilson AT github
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringdefaultPrefixprotected static StringdefaultSuffixprotected static StringextSplitter
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringaddPrefixAndSuffix(File orig, FileOutputMapper mapper)protected FiledoMapFile(File orig)StringgetPrefix()StringgetSuffix()FilemapFile(File orig)Map an original source file to an output file using the getPrefix() as the file name prefix and get suffix as the suffix.StringtoString()
-
-
-
Field Detail
-
defaultPrefix
protected static final String defaultPrefix
- See Also:
- Constant Field Values
-
defaultSuffix
protected static final String defaultSuffix
- See Also:
- Constant Field Values
-
extSplitter
protected static final String extSplitter
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPrefix
public String getPrefix()
- Specified by:
getPrefixin interfaceFileOutputMapper- Returns:
- the prefix added to the mapped file name
-
getSuffix
public String getSuffix()
- Specified by:
getSuffixin interfaceFileOutputMapper- Returns:
- the suffix appended to the mapped name
-
mapFile
public File mapFile(File orig) throws VeraPDFException
Description copied from interface:FileOutputMapperMap an original source file to an output file using the getPrefix() as the file name prefix and get suffix as the suffix. The location of the final file will be subject to the mapping rules of the particular implementation. Note that the file returned won't necessarily exist and will be untested regards write capability and the like.- Specified by:
mapFilein interfaceFileOutputMapper- Returns:
- the
Fileobject for the mapped file. - Throws:
VeraPDFException- if there's a problem creating the mapped file
-
addPrefixAndSuffix
protected static String addPrefixAndSuffix(File orig, FileOutputMapper mapper)
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
-