public class FileSystemStorage.FileSystemResolver extends Storage.PackageResolver
| Constructor and Description |
|---|
FileSystemResolver(java.nio.file.Path pkg_dir,
java.lang.String abbrev,
java.lang.String rsrc_name) |
| Modifier and Type | Method and Description |
|---|---|
java.net.URI |
getContentDirBaseURI()
The base URI of the package "content directory".
|
java.lang.String |
getResourceName() |
javax.xml.transform.stream.StreamSource |
resolveComponent(java.lang.String path)
Resolve a resource within the package "content directory".
|
java.nio.file.Path |
resolveComponentAsFile(java.lang.String path) |
javax.xml.transform.stream.StreamSource |
resolveResource(java.lang.String path)
Resolve a resource within the "package directory".
|
java.nio.file.Path |
resolveResourceAsFile(java.lang.String path) |
public FileSystemResolver(@Nullable
java.nio.file.Path pkg_dir,
java.lang.String abbrev,
java.lang.String rsrc_name)
throws PackageException
PackageExceptionpublic java.lang.String getResourceName()
getResourceName in class Storage.PackageResolverpublic java.net.URI getContentDirBaseURI()
Storage.PackageResolverURI.resolve(String) on the returned value, with a
relative filename, must resolve this filename in the installed package
"content directory".
Use with caution, especially on storages not on a (regular) file-system.getContentDirBaseURI in class Storage.PackageResolverpublic java.nio.file.Path resolveResourceAsFile(java.lang.String path)
public java.nio.file.Path resolveComponentAsFile(java.lang.String path)
public javax.xml.transform.stream.StreamSource resolveResource(java.lang.String path)
throws PackageException,
Storage.NotExistException
Storage.PackageResolverresolveResource in class Storage.PackageResolverpath - The path to resolve, relative to the package directory.Source object.PackageException - in case of any other error.Storage.NotExistException - if the corresponding resource does not exist
in the package.public javax.xml.transform.stream.StreamSource resolveComponent(java.lang.String path)
throws PackageException,
Storage.NotExistException
Storage.PackageResolverresolveComponent in class Storage.PackageResolverpath - The path to resolve, relative to the package content
directory.Source object.PackageException - in case of any other error.Storage.NotExistException - if the corresponding component does not exist
in the package.Copyright © 2015-2023 EXPath. All Rights Reserved