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 FedoraResponsepublic InputStream getEntityInputStream()
FedoraResponseGets the raw response entity.
getEntityInputStream in interface FedoraResponsepublic <T> T getEntity(Class<T> c)
FedoraResponseGets the raw response entity.
getEntity in interface FedoraResponsepublic String getType()
FedoraResponseGet the media type of the response;
getType in interface FedoraResponseprotected XPath getXPath()
public Object unmarshallResponse(FedoraResponseImpl.ContextPath contextPath) throws FedoraClientException
contextPath - JAXB contextPathFedoraClientExceptionpublic void close()
FedoraResponseClose the response.
The entity input stream is closed;
close in interface FedoraResponseCopyright © 2010-2013 MediaShelf. All Rights Reserved.