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 java.lang.Object
implements org.eclipse.core.resources.IStorage
This implementation of an IStorage will allow us to keep track of the URIHandler that'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

    Modifier and Type Method Description
    boolean equals​(java.lang.Object obj)  
    java.lang.Object getAdapter​(java.lang.Class adapter)
    java.io.InputStream getContents()
    org.eclipse.core.runtime.IPath getFullPath()
    java.lang.String getName()
    URI getURI()
    Returns the unmodified URI for this storage (will need normalization).
    int hashCode()  
    boolean isReadOnly()

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • getAdapter

      public java.lang.Object getAdapter​(java.lang.Class adapter)
      Specified by:
      getAdapter in interface org.eclipse.core.runtime.IAdaptable
      See Also:
      IAdaptable.getAdapter(java.lang.Class)
    • getContents

      public java.io.InputStream getContents() throws org.eclipse.core.runtime.CoreException
      Specified by:
      getContents in interface org.eclipse.core.resources.IStorage
      Throws:
      org.eclipse.core.runtime.CoreException
      See Also:
      IStorage.getContents()
    • getFullPath

      public org.eclipse.core.runtime.IPath getFullPath()
      Specified by:
      getFullPath in interface org.eclipse.core.resources.IStorage
      See Also:
      IStorage.getFullPath()
    • getName

      public java.lang.String getName()
      Specified by:
      getName in interface org.eclipse.core.resources.IStorage
      See Also:
      IStorage.getName()
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface org.eclipse.core.resources.IStorage
      See Also:
      IStorage.isReadOnly()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • getURI

      public URI getURI()
      Returns the unmodified URI for this storage (will need normalization).
      Returns:
      The unmodified URI for this storage.