Class SolidResourceReference

java.lang.Object
com.inrupt.client.solid.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.
      Parameters:
      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
      Returns:
      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
      Returns:
      the metadata
    • getEntity

      public InputStream getEntity() throws IOException
      Description copied from interface: Resource
      The resource entity.
      Specified by:
      getEntity in interface Resource
      Returns:
      the resource entity
      Throws:
      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
      Returns:
      the resource headers
    • getContentType

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

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