public final class RevisionedURIConverter extends StorageURIConverter
URIConverter
will be used in order to fetch remote content instead of local content when
loading resources.ExtensibleURIConverterImpl.ContentHandlerList, ExtensibleURIConverterImpl.URIHandlerList, ExtensibleURIConverterImpl.URIMap
URIConverter.Cipher, URIConverter.Loadable, URIConverter.Readable, URIConverter.ReadableInputStream, URIConverter.Saveable, URIConverter.Writeable, URIConverter.WriteableOutputStream
contentHandlers, uriHandlers, uriMap
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 and Description |
---|
RevisionedURIConverter(URIConverter delegate,
IStorageProviderAccessor storageAccessor,
IStorageProviderAccessor.DiffSide side)
Instantiates our URI converter given its delegate.
|
Modifier and Type | Method and Description |
---|---|
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.
|
createStorage, getLoadedRevisions
contentDescription, createInputStream, createOutputStream, createOutputStream, delete, getAttributes, getContentHandlers, getURIHandler, getURIHandlers, getURIMap, normalize, setAttributes
getInternalURIMap
public RevisionedURIConverter(URIConverter delegate, IStorageProviderAccessor storageAccessor, IStorageProviderAccessor.DiffSide side)
delegate
- Our delegate URI converter.storageAccessor
- The accessor that will provide synchronization information for the loaded files.side
- The side we are currently resolving.public boolean prefetchStream(URI uri, Map<?,?> options) throws IOException
See comments on prefetchedStreams
. This is used to avoid loading a single URI more than once.
uri
- see createInputStream(URI, Map)
options
- see createInputStream(URI, Map)
true
if there is an input stream accessible for the given uri, false
otherwise.IOException
- if an IO problem occurs.createInputStream(URI, Map)
,
prefetchedStreams
public InputStream createInputStream(URI uri, Map<?,?> options) throws IOException
createInputStream
in interface URIConverter
createInputStream
in class StorageURIConverter
IOException
StorageURIConverter.createInputStream(org.eclipse.emf.common.util.URI,
java.util.Map)
public boolean exists(URI uri, Map<?,?> options)
exists
in interface URIConverter
exists
in class DelegatingURIConverter
DelegatingURIConverter.exists(org.eclipse.emf.common.util.URI,
java.util.Map)
Copyright (c) 2006, 2015 Obeo and others. All rights reserved.