public class SeqWareWebserviceClient extends Object
SeqWareWebserviceClient client = new SeqWareWebserviceClient(); Object response = client.XXX(...); // do whatever with response client.close();
Constructor and Description |
---|
SeqWareWebserviceClient() |
SeqWareWebserviceClient(String modelName)
Constructs a SeqWare web service client for the given resource and url.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
countREST() |
void |
create_JSON(Object requestEntity) |
void |
create_XML(Object requestEntity) |
void |
edit_JSON(Object requestEntity) |
void |
edit_XML(Object requestEntity) |
<T> T |
find_JSON(Class<T> responseType,
String id) |
<T> T |
find_XML(Class<T> responseType,
String id) |
<T> T |
findAll_JSON(Class<T> responseType) |
<T> T |
findAll_XML(Class<T> responseType) |
<T> T |
findRange_JSON(Class<T> responseType,
String from,
String to) |
<T> T |
findRange_XML(Class<T> responseType,
String from,
String to) |
com.sun.jersey.api.client.Client |
getClient() |
com.sun.jersey.api.client.WebResource |
getWebResource() |
void |
remove(String id) |
void |
setClient(com.sun.jersey.api.client.Client client) |
void |
setWebResource(com.sun.jersey.api.client.WebResource webResource) |
public SeqWareWebserviceClient()
public SeqWareWebserviceClient(String modelName)
modelName
- Lowercase resource name. (e.g. study, registration, sample)public void remove(String id) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public String countREST() throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public <T> T findAll_XML(Class<T> responseType) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public <T> T findAll_JSON(Class<T> responseType) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public void edit_XML(Object requestEntity) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public void edit_JSON(Object requestEntity) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public void create_XML(Object requestEntity) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public void create_JSON(Object requestEntity) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public <T> T findRange_XML(Class<T> responseType, String from, String to) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public <T> T findRange_JSON(Class<T> responseType, String from, String to) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public <T> T find_XML(Class<T> responseType, String id) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public <T> T find_JSON(Class<T> responseType, String id) throws com.sun.jersey.api.client.UniformInterfaceException
com.sun.jersey.api.client.UniformInterfaceException
public void close()
public com.sun.jersey.api.client.WebResource getWebResource()
public com.sun.jersey.api.client.Client getClient()
public void setClient(com.sun.jersey.api.client.Client client)
client
- the client to setpublic void setWebResource(com.sun.jersey.api.client.WebResource webResource)
webResource
- the webResource to setCopyright © 2015 SeqWare. All rights reserved.