Class URIStorage
- java.lang.Object
-
- org.eclipse.emf.compare.ide.internal.utils.URIStorage
-
- All Implemented Interfaces:
org.eclipse.core.resources.IStorage,org.eclipse.core.runtime.IAdaptable
public class URIStorage extends Object implements org.eclipse.core.resources.IStorage
This implementation of anIStoragewill allow us to keep track of theURIHandlerthat's been used to load a given URI from this uri converter.
-
-
Constructor Summary
Constructors Constructor Description URIStorage(URI uri, URIHandler handler, URIConverter converter)Creates an URIStorage for the given URI an its associated handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ObjectgetAdapter(Class adapter)InputStreamgetContents()org.eclipse.core.runtime.IPathgetFullPath()StringgetName()URIgetURI()Returns the unmodified URI for this storage (will need normalization).inthashCode()booleanisReadOnly()
-
-
-
Constructor Detail
-
URIStorage
public URIStorage(URI uri, URIHandler handler, URIConverter converter)
Creates an URIStorage for the given URI an its associated handler.- Parameters:
uri- The target uri of this storage.handler- The URI handler that can be used to retrieve this URI's contents.converter- The URI converter which created this storage.
-
-
Method Detail
-
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable- See Also:
IAdaptable.getAdapter(java.lang.Class)
-
getContents
public InputStream getContents() throws org.eclipse.core.runtime.CoreException
- Specified by:
getContentsin interfaceorg.eclipse.core.resources.IStorage- Throws:
org.eclipse.core.runtime.CoreException- See Also:
IStorage.getContents()
-
getFullPath
public org.eclipse.core.runtime.IPath getFullPath()
- Specified by:
getFullPathin interfaceorg.eclipse.core.resources.IStorage- See Also:
IStorage.getFullPath()
-
getName
public String getName()
- Specified by:
getNamein interfaceorg.eclipse.core.resources.IStorage- See Also:
IStorage.getName()
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin interfaceorg.eclipse.core.resources.IStorage- See Also:
IStorage.isReadOnly()
-
getURI
public URI getURI()
Returns the unmodified URI for this storage (will need normalization).- Returns:
- The unmodified URI for this storage.
-
-