Class GetCompact

All Implemented Interfaces:
ResourceRequest<ResourceResponse<Compact>>, Callable<ResourceResponse<Compact>>

public class GetCompact extends GetResource<Compact>
Dedicated GetResource for getting Compacts. Unlike GetResource, this class normalizes the entity if Preview resources are nested due to a wrong use of rdf:parseType="Resource" attributes by the remote application.
Since:
3.6.1
  • Constructor Details

    • GetCompact

      public GetCompact(OslcClient client, URI uri)
      Creates a new instance to execute a GET on the specified resource.
      Parameters:
      client - the REST client used to execute a request.
      uri - the URI used for the underlying request.
  • Method Details

    • createResponse

      protected ResourceResponse<Compact> createResponse(OslcResource resource, ClientResponse response)
      Description copied from class: GetResource
      Extracts a ResourceResponse instance from the obtained HTTP response. The response contains the response headers, from which the ETag header can be extracted in case this request is to follow by a PUT.
      Overrides:
      createResponse in class GetResource<Compact>
      Parameters:
      resource - the resource on which a request is executed.
      response - the response obtained.
      Returns:
      the extraction of the response content into the expected format.