Package io.ocfl.core.path.mapper
Class PercentEncodingLogicalPathMapper
- java.lang.Object
-
- io.ocfl.core.path.mapper.PercentEncodingLogicalPathMapper
-
- All Implemented Interfaces:
LogicalPathMapper
public class PercentEncodingLogicalPathMapper extends Object implements LogicalPathMapper
ALogicalPathMapper
that percent-encodes specific characters in logical paths to produce safe content paths.
-
-
Constructor Summary
Constructors Constructor Description PercentEncodingLogicalPathMapper(PercentEscaper percentEscaper)
Constructs a newPercentEncodingLogicalPathMapper
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toContentPathPart(String logicalPath)
Maps a logical path to a content path.
-
-
-
Constructor Detail
-
PercentEncodingLogicalPathMapper
public PercentEncodingLogicalPathMapper(PercentEscaper percentEscaper)
Constructs a newPercentEncodingLogicalPathMapper
.- Parameters:
percentEscaper
- the escaper to use for percent-encoding- See Also:
LogicalPathMappers.percentEncodingWindowsMapper()
,LogicalPathMappers.percentEncodingLinuxMapper()
,LogicalPathMappers.percentEncodingCloudMapper()
,LogicalPathMappers.percentEncodingAllMapper()
,LogicalPathMappers.conservativePercentEncodingMapper()
-
-
Method Detail
-
toContentPathPart
public String toContentPathPart(String logicalPath)
Description copied from interface:LogicalPathMapper
Maps a logical path to a content path. This content path MUST be relative a version's content directory; not the object root.- Specified by:
toContentPathPart
in interfaceLogicalPathMapper
- Parameters:
logicalPath
- path to map- Returns:
- content path relative version content directory
-
-