Class SolidResourceReference

All Implemented Interfaces:
Resource, SolidResource, AutoCloseable

public class SolidResourceReference extends Object implements SolidResource
A reference to a Solid Resource without any corresponding data.
  • Constructor Details

    • SolidResourceReference

      public SolidResourceReference(URI identifier, Metadata metadata)
      Create a reference to a Solid resource.
      identifier - the resource identifier
      metadata - the resource metadata
  • Method Details

    • getIdentifier

      public URI getIdentifier()
      Description copied from interface: Resource
      The resource identifier.
      Specified by:
      getIdentifier in interface Resource
      the identifier
    • getMetadata

      public Metadata getMetadata()
      Description copied from interface: SolidResource
      Get the associated metadata about this resource.

      Typically, this metadata will be populated with information from response headers. For manually created SolidResource objects, this will generally be empty.

      Specified by:
      getMetadata in interface SolidResource
      the metadata
    • getEntity

      public InputStream getEntity() throws IOException
      Description copied from interface: Resource
      The resource entity.
      Specified by:
      getEntity in interface Resource
      the resource entity
      IOException - in the case of an error when generating the entity
    • getHeaders

      public Headers getHeaders()
      Description copied from interface: Resource
      The resource headers.
      Specified by:
      getHeaders in interface Resource
      the resource headers
    • getContentType

      public String getContentType()
      Description copied from interface: Resource
      The content type of the resource.
      Specified by:
      getContentType in interface Resource
      the content type
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable