public class FedoraResponseImpl extends Object implements FedoraResponse
Modifier and Type | Class and Description |
---|---|
static class |
FedoraResponseImpl.ContextPath
Enum for JAXB ContextPaths used by FedoraResponse implementations.
|
Constructor and Description |
---|
FedoraResponseImpl(com.sun.jersey.api.client.ClientResponse cr)
Constructor for a FedoraResponseImpl.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the response.
|
<T> T |
getEntity(Class<T> c)
Gets the raw response entity.
|
InputStream |
getEntityInputStream()
Gets the raw response entity.
|
int |
getStatus() |
String |
getType()
Get the media type of the response;
|
protected XPath |
getXPath() |
Object |
unmarshallResponse(FedoraResponseImpl.ContextPath contextPath)
Unmarshall the Fedora ClientResponse using the JAXB schema-generated
classes (see: target/generated-sources/).
|
public FedoraResponseImpl(com.sun.jersey.api.client.ClientResponse cr) throws FedoraClientException
cr
- FedoraClientException
- if the HTTP status code of the response is >= 400.public int getStatus()
getStatus
in interface FedoraResponse
public InputStream getEntityInputStream()
FedoraResponse
Gets the raw response entity.
getEntityInputStream
in interface FedoraResponse
public <T> T getEntity(Class<T> c)
FedoraResponse
Gets the raw response entity.
getEntity
in interface FedoraResponse
public String getType()
FedoraResponse
Get the media type of the response;
getType
in interface FedoraResponse
protected XPath getXPath()
public Object unmarshallResponse(FedoraResponseImpl.ContextPath contextPath) throws FedoraClientException
contextPath
- JAXB contextPathFedoraClientException
public void close()
FedoraResponse
Close the response.
The entity input stream is closed;
close
in interface FedoraResponse
Copyright © 2010-2013 MediaShelf. All Rights Reserved.