public class DataObjectResolver extends Object
| Constructor and Description |
|---|
DataObjectResolver() |
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeTempFileName(String encodedFileName,
Map<String,String> encodedFileNameMap)
Decodes filename as RAW filename.
|
static String |
decodeUriToPath(String uri) |
static URI |
encodePathToUri(String path) |
static String |
encodeTempFileName(String rawFileName,
Map<String,String> encodedFileNameMap)
Encodes RAW filename to use as OS independent temporary filename.
|
static DataObject |
resolveDataFileByName(File docRoot,
String name)
Resolves DataObject by the given name.
|
static DataObject |
resolveDataFileByUri(File docRoot,
URI uri) |
public static URI encodePathToUri(String path) throws URISyntaxException
URISyntaxExceptionpublic static String decodeUriToPath(String uri) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic static DataObject resolveDataFileByName(File docRoot, String name)
docRoot - document root directory.name - RAW unencoded filename as defined in 'Open Document Format : manifest'.encodePathToUri(String)public static DataObject resolveDataFileByUri(File docRoot, URI uri) throws URISyntaxException, IOException
URISyntaxExceptionIOExceptionpublic static String encodeTempFileName(String rawFileName, Map<String,String> encodedFileNameMap) throws URISyntaxException
rawFileName - RAW filename.encodedFileNameMap - map where to store the encoded name pair.URISyntaxExceptionpublic static String decodeTempFileName(String encodedFileName, Map<String,String> encodedFileNameMap) throws UnsupportedEncodingException
encodedFileName - encoded filename.encodedFileNameMap - map where to lookup the encoded name pair.UnsupportedEncodingException