Package org.eclipse.emf.cdo.common.util
Interface URIHandlerRegistry
public interface URIHandlerRegistry
A
global URI handler registry.
Handlers registered here are available through this registry. They are not automatically available to arbitrary EMF
URI converters. Use installTo(URIConverter) or installTo(ResourceSet) when a particular converter should
consult this registry. For example:
ResourceSet resourceSet = new ResourceSetImpl();
URIHandlerRegistry.INSTANCE.install(resourceSet);
URI uri = URI.createURI("cdo.checkout.text://my-checkout/path/to/file.txt");
InputStream in = resourceSet.getURIConverter().createInputStream(uri);
The schemes available at runtime depend on the URIHandlerFactory contributions.
- Since:
- 4.13
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionaddURIHandler(String scheme, URIHandler handler) Adds a URI handler for the given scheme to this registry.getURIHandler(String scheme) Returns the URI handler for the given scheme, ornullif none is registered.booleaninstallTo(ResourceSet resourceSet) Installs this registry into a resource set's URI converter, if it is not already present.booleaninstallTo(URIConverter uriConverter) Installs this registry into a URI converter, if it is not already present.removeURIHandler(String scheme) Removes the URI handler for the given scheme from this registry and returns it.booleanuninstallFrom(ResourceSet resourceSet) Removes this exact registry instance from a resource set's URI converter.booleanuninstallFrom(URIConverter uriConverter) Removes this exact registry instance from a URI converter.
-
Field Details
-
INSTANCE
-
-
Method Details
-
addURIHandler
Adds a URI handler for the given scheme to this registry.If a handler was already registered for the scheme, it is replaced and returned.
-
removeURIHandler
Removes the URI handler for the given scheme from this registry and returns it. -
getURIHandler
Returns the URI handler for the given scheme, ornullif none is registered. -
installTo
Installs this registry into a URI converter, if it is not already present.- Returns:
trueif the converter was changed, orfalseif this registry was already installed.- Since:
- 4.28
-
installTo
Installs this registry into a resource set's URI converter, if it is not already present.- Returns:
trueif the resource set was changed, orfalseif this registry was already installed.- Since:
- 4.28
-
uninstallFrom
Removes this exact registry instance from a URI converter.- Returns:
trueif the converter was changed, orfalseif this registry was not installed.- Since:
- 4.28
-
uninstallFrom
Removes this exact registry instance from a resource set's URI converter.- Returns:
trueif the resource set was changed, orfalseif this registry was not installed.- Since:
- 4.28
-