Package com.sodius.oslc.client.requests
Class GetCompact
- java.lang.Object
-
- com.sodius.oslc.client.requests.AbstractResourceRequest<ResourceResponse<T>>
-
- com.sodius.oslc.client.requests.GetResource<Compact>
-
- com.sodius.oslc.client.requests.GetCompact
-
- All Implemented Interfaces:
ResourceRequest<ResourceResponse<Compact>>,Callable<ResourceResponse<Compact>>
public class GetCompact extends GetResource<Compact>
DedicatedGetResourcefor gettingCompacts. UnlikeGetResource, this class normalizes the entity ifPreviewresources are nested due to a wrong use ofrdf:parseType="Resource"attributes by the remote application.- Since:
- 3.6.1
-
-
Constructor Summary
Constructors Constructor Description GetCompact(OslcClient client, URI uri)Creates a new instance to execute a GET on the specified resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ResourceResponse<Compact>createResponse(OslcResource resource, ClientResponse response)Extracts aResourceResponseinstance from the obtained HTTP response.-
Methods inherited from class com.sodius.oslc.client.requests.GetResource
call, get
-
Methods inherited from class com.sodius.oslc.client.requests.AbstractResourceRequest
call, createErrorResponse, createResourceResponse, getClient, getUri
-
-
-
-
Constructor Detail
-
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 Detail
-
createResponse
protected ResourceResponse<Compact> createResponse(OslcResource resource, ClientResponse response)
Description copied from class:GetResourceExtracts aResourceResponseinstance from the obtained HTTP response. The response contains the response headers, from which theETagheader can be extracted in case this request is to follow by aPUT.- Overrides:
createResponsein classGetResource<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.
-
-