Class RelativePathResolver_impl
- All Implemented Interfaces:
RelativePathResolver
RelativePathResolver.-
Field Summary
Fields inherited from interface org.apache.uima.resource.RelativePathResolver
UIMA_DATAPATH_PROP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanfileExistsAtUrl(URL aUrl) protected URL[]Deprecated.Deprecated.Deprecated.Gets the data path used to resolve relative paths.resolveRelativePath(String aPathOrUrl) Resolves a path relative to each element of the data path, sequentially starting with the first element.resolveRelativePath(URL aUrl) Deprecated.voidsetDataPath(String aPath) Deprecated.voidsetDataPathElements(File... aElements) Sets the data path elements used to resolve relative paths.voidsetDataPathElements(String... aElements) Sets the data path elements used to resolve relative paths.voidsetDataPathElements(URL... aElements) Sets the data path elements used to resolve relative paths.voidsetPathResolverClassLoader(ClassLoader aClassLoader) Sets the ClassLoader that should be used to resolve the resources.
-
Constructor Details
-
RelativePathResolver_impl
public RelativePathResolver_impl() -
RelativePathResolver_impl
-
-
Method Details
-
getDataPath
Deprecated.Description copied from interface:RelativePathResolverGets the data path used to resolve relative paths. More than one directory may be specified by separating them with the Systempath.separatorcharacter (; on windows, : on UNIX). Elements of this path may be absolute or relative file paths.Note: This method will only return file paths. If any non-file URLs have been added to the data path e.g via
RelativePathResolver.setDataPathElements(URL...), these will not be included. UseRelativePathResolver.getDataPathUrls()to get a full list.- Specified by:
getDataPathin interfaceRelativePathResolver- Returns:
- the data path
-
getDataPathElements
Deprecated.Description copied from interface:RelativePathResolverGets the data path used to resolve relative paths. Elements of this path may be absolute or relative file paths.Note: This method will only return file paths. If any non-file URLs have been added to the data path e.g via
RelativePathResolver.setDataPathElements(URL...), these will not be included. UseRelativePathResolver.getDataPathUrls()to get a full list.- Specified by:
getDataPathElementsin interfaceRelativePathResolver- Returns:
- the data path
-
getDataPathUrls
Description copied from interface:RelativePathResolverGets the data path used to resolve relative paths. Elements of this path may be absolute or relative URLs.- Specified by:
getDataPathUrlsin interfaceRelativePathResolver- Returns:
- the data path
-
setDataPathElements
Description copied from interface:RelativePathResolverSets the data path elements used to resolve relative paths. Elements of this path may be absolute or relative file paths.- Specified by:
setDataPathElementsin interfaceRelativePathResolver- Parameters:
aElements- the data path elements- Throws:
MalformedURLException- if a file path could not be converted to a URL
-
setDataPathElements
Description copied from interface:RelativePathResolverSets the data path elements used to resolve relative paths. Elements of this path may be URLs or absolute or relative file paths.- Specified by:
setDataPathElementsin interfaceRelativePathResolver- Parameters:
aElements- the data path elements- Throws:
MalformedURLException- if a file path could not be converted to a URL
-
setDataPathElements
Description copied from interface:RelativePathResolverSets the data path elements used to resolve relative paths. Elements of this path may be absolute or relative URLs.- Specified by:
setDataPathElementsin interfaceRelativePathResolver- Parameters:
aElements- the data path aURLs
-
setDataPath
Deprecated.Description copied from interface:RelativePathResolverSets the data path used to resolve relative paths. More than one directory may be specified by separating them with the Systempath.separatorcharacter (; on windows, : on UNIX). Elements of this path may be absolute or relative file paths.- Specified by:
setDataPathin interfaceRelativePathResolver- Parameters:
aPath- the data path- Throws:
MalformedURLException- if a file path could not be converted to a URL
-
resolveRelativePath
Description copied from interface:RelativePathResolverResolves a path relative to each element of the data path, sequentially starting with the first element. If this results in an absolute URL at which a file actually exists, that absolute URL is returned. If no file could be found,nullis returned.Note: For backwards compatibility, it is still allowed to specify relative URLs here such as
file:foo/foo.txtand this will effectively work as iffoo/foo.txthad been specified. The protocol is simply discarded. Future versions will no longer accept a protocol in relative paths.- Specified by:
resolveRelativePathin interfaceRelativePathResolver- Parameters:
aPathOrUrl- the path/URL to be resolved (if an absolute URL is specified, it will be returned unmodified if a file actually exists at the URL; otherwisenullwill be returned).- Returns:
- the absolute URL at which the file exists,
nullit none could be found.
-
resolveRelativePath
Deprecated.Description copied from interface:RelativePathResolverResolves an URLrelative to each element of the data path, sequentially starting with the first element. If this results in an absolute URL at which a file actually exists, that absolute URL is returned. If no file could be found,nullis returned.- Specified by:
resolveRelativePathin interfaceRelativePathResolver- Parameters:
aUrl- the URL to be resolved (if an absolute URL is specified, it will be returned unmodified if a file actually exists at the URL; otherwisenullwill be returned).- Returns:
- the absolute URL at which the file exists,
nullit none could be found.
-
setPathResolverClassLoader
Description copied from interface:RelativePathResolverSets the ClassLoader that should be used to resolve the resources.- Specified by:
setPathResolverClassLoaderin interfaceRelativePathResolver- Parameters:
aClassLoader- the ClassLoader that should be used to resolve the resources.
-
fileExistsAtUrl
-
getBaseUrls
Deprecated.UsegetDataPathUrls()instead.- Returns:
- the base URLs that were parsed from the data path.
-
getDataPathUrls()instead.