org.eclipse.emf.compare.ide.ui.internal.logical.resolver

## 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

    public final class RevisionedURIConverter
    extends StorageURIConverter

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

Constructors
Constructor and Description
`RevisionedURIConverter(URIConverter delegate, IStorageProviderAccessor storageAccessor, IStorageProviderAccessor.DiffSide side)` Instantiates our URI converter given its delegate.

### Method Summary

All Methods Instance Methods Concrete Methods
`InputStream` `createInputStream(URI uri, Map<?,?> options)`
`boolean` `exists(URI uri, Map<?,?> options)`
`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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### 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 Detail

#### prefetchStream

    public boolean prefetchStream(URI uri,
                                  Map<?,?> options)
                           throws IOException

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` - see `createInputStream(URI, Map)`
  `options` - see `createInputStream(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

    public InputStream createInputStream(URI uri,
                                         Map<?,?> options)
                                  throws IOException

Specified by:
  `createInputStream` in interface `URIConverter`
Overrides:
  `createInputStream` in class `StorageURIConverter`
Throws:
  `IOException`
See Also:
  `StorageURIConverter.createInputStream(org.eclipse.emf.common.util.URI, java.util.Map)`

#### exists

    public boolean exists(URI uri,
                          Map<?,?> options)

Specified by:
  `exists` in interface `URIConverter`
Overrides:
  `exists` in class `DelegatingURIConverter`
See Also:
  `DelegatingURIConverter.exists(org.eclipse.emf.common.util.URI, java.util.Map)`