Class RevisionedURIConverter
java.lang.Object
org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl
org.eclipse.emf.compare.utils.DelegatingURIConverter
org.eclipse.emf.compare.ide.utils.StorageURIConverter
org.eclipse.emf.compare.ide.ui.internal.logical.resolver.RevisionedURIConverter
- All Implemented Interfaces:
URIConverter
This
URIConverter
will be used in order to fetch remote content instead of local content when
loading resources.-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl
ExtensibleURIConverterImpl.ContentHandlerList, ExtensibleURIConverterImpl.URIHandlerList, ExtensibleURIConverterImpl.URIMap
Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.resource.URIConverter
URIConverter.Cipher, URIConverter.Loadable, URIConverter.Readable, URIConverter.ReadableInputStream, URIConverter.Saveable, URIConverter.Writeable, URIConverter.WriteableOutputStream
-
Field Summary
Fields inherited from class org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl
contentHandlers, uriHandlers, uriMap
Fields inherited from interface org.eclipse.emf.ecore.resource.URIConverter
ATTRIBUTE_ARCHIVE, ATTRIBUTE_DIRECTORY, ATTRIBUTE_EXECUTABLE, ATTRIBUTE_HIDDEN, ATTRIBUTE_LENGTH, ATTRIBUTE_READ_ONLY, ATTRIBUTE_TIME_STAMP, INSTANCE, NULL_TIME_STAMP, OPTION_REQUESTED_ATTRIBUTES, OPTION_RESPONSE, OPTION_TIMEOUT, OPTION_URI_CONVERTER, RESPONSE_TIME_STAMP_PROPERTY, RESPONSE_URI, URI_MAP
-
Constructor Summary
ConstructorDescriptionRevisionedURIConverter
(URIConverter delegate, IStorageProviderAccessor storageAccessor, IStorageProviderAccessor.DiffSide side) Instantiates our URI converter given its delegate. -
Method Summary
Modifier and TypeMethodDescriptioncreateInputStream
(URI uri, Map<?, ?> options) boolean
boolean
prefetchStream
(URI uri, Map<?, ?> options) Prefetches the input stream for the given URI if any.Methods inherited from class org.eclipse.emf.compare.ide.utils.StorageURIConverter
createInputStream, createStorage, getLoadedRevisions
Methods inherited from class org.eclipse.emf.compare.utils.DelegatingURIConverter
contentDescription, createOutputStream, delete, getAttributes, getContentHandlers, getURIHandler, getURIHandlers, getURIMap, normalize, setAttributes
Methods inherited from class org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl
createOutputStream, getInternalURIMap
-
Constructor Details
-
RevisionedURIConverter
public RevisionedURIConverter(URIConverter delegate, IStorageProviderAccessor storageAccessor, IStorageProviderAccessor.DiffSide side) Instantiates our URI converter given its delegate.- Parameters:
delegate
- Our delegate URI converter.storageAccessor
- The accessor that will provide synchronization information for the loaded files.side
- The side we are currently resolving.
-
-
Method Details
-
prefetchStream
Prefetches the input stream for the given URI if any. Note that the stream will be left opened and cached by this URIConverter, only to be closed when the associated "load resource" is called.See comments on
prefetchedStreams
. This is used to avoid loading a single URI more than once.- Parameters:
uri
- seecreateInputStream(URI, Map)
options
- seecreateInputStream(URI, Map)
- Returns:
true
if there is an input stream accessible for the given uri,false
otherwise.- Throws:
IOException
- if an IO problem occurs.- See Also:
-
createInputStream(URI, Map)
prefetchedStreams
-
createInputStream
- Specified by:
createInputStream
in interfaceURIConverter
- Overrides:
createInputStream
in classStorageURIConverter
- Throws:
IOException
- See Also:
-
exists
- Specified by:
exists
in interfaceURIConverter
- Overrides:
exists
in classDelegatingURIConverter
- See Also:
-