PartialUriConverters
Partial URI converters, typically converting HTTP or HTTPS URIs to local file URIs. Typically a PartialUriConverter is created from a SimpleCatalog. This is also desirable, because catalogs are clear and precise URI mappings. Yet not every PartialUriConverter can be created from a SimpleCatalog, for example because an URI may map to the first of a list of local URIs where the document can be found, which cannot be expressed with a SimpleCatalog.
Partial URI converters, typically converting HTTP or HTTPS URIs to local file URIs. Typically a PartialUriConverter is created from a SimpleCatalog. This is also desirable, because catalogs are clear and precise URI mappings. Yet not every PartialUriConverter can be created from a SimpleCatalog, for example because an URI may map to the first of a list of local URIs where the document can be found, which cannot be expressed with a SimpleCatalog.
Sometimes it is desirable to create a SimpleCatalog and corresponding PartialUriConverter from some parent directory, but there are several possible heuristics for creating a SimpleCatalog from such a parent directory. Hence it is up to the application to generate a SimpleCatalog from the parent directory. Method PartialUriConverters.fromCatalog can then be used to turn that SimpleCatalog into a PartialUriConverter.
Note that there is only one fundamental method in this singleton object, namely fromCatalog.
- Authors
Chris de Vreeze
Type members
Types
Value members
Concrete methods
Like acceptOnlyExistingFile
, but also returning true for absolute "http" or "https" URIs
Like acceptOnlyExistingFile
, but also returning true for absolute "http" or "https" URIs
URI filter that only returns true for absolute "file" protocol URIs for existing normal files (so no directories)
URI filter that only returns true for absolute "file" protocol URIs for existing normal files (so no directories)
Turns the given catalog into a partial URI converter. It can return absolute and/or relative URIs. Relative URIs are typically meant to be resolved inside ZIP files.
Turns the given catalog into a partial URI converter. It can return absolute and/or relative URIs. Relative URIs are typically meant to be resolved inside ZIP files.
The partial URI converter is only defined for URIs matching URI start strings in the catalog.
Turns a non-empty collection of catalogs into a partial URI converter, finding the first optional mapped URI for which the given URI function returns true. This method is useful if some URIs can be mapped to multiple target URIs, and we can describe this mapping as a non-empty collection of catalogs along with a filtering condition on mapped URIs.
Turns a non-empty collection of catalogs into a partial URI converter, finding the first optional mapped URI for which the given URI function returns true. This method is useful if some URIs can be mapped to multiple target URIs, and we can describe this mapping as a non-empty collection of catalogs along with a filtering condition on mapped URIs.