@Path(value="/datasets") public class DatasetsResource extends Object
Constructor and Description |
---|
DatasetsResource() |
Modifier and Type | Method and Description |
---|---|
String |
createDataset(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
Create dataset from zip file.
|
boolean |
deleteDataset(String datasetId)
Mark dataset as deleted
|
javax.ws.rs.core.Response |
deleteFile(String datasetId,
String fileDescriptorId)
get the file with given id
|
Dataset |
getDataset(String datasetId)
Get a dataset by Id
|
List<Dataset> |
getDatasets(int size,
int page,
String email,
String pattern,
boolean showdeleted)
Get all datasets
|
javax.ws.rs.core.Response |
getDatasetZip(String datasetId)
Get a dataset in zip with all other files by Id
|
javax.ws.rs.core.Response |
getFile(String datasetId,
String fileDescriptorId)
get the file with given id
|
FileDescriptor |
getFileDescriptor(String datasetId,
String fileDescriptorId)
Get a FileDescriptor by dataset-Id and filedescriptor-id
|
javax.ws.rs.core.Response |
purgeDataset(String datasetId)
Delete dataset from repository
|
@POST @Consumes(value="multipart/form-data") @Produces(value="text/plain") public String createDataset(org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataInput input)
input
- a dataset created from Zip or from a file@GET @Produces(value="application/json") public List<Dataset> getDatasets(@QueryParam(value="size")@DefaultValue(value="-1") int size, @QueryParam(value="page")@DefaultValue(value="0") int page, @QueryParam(value="email")@DefaultValue(value="") String email, @QueryParam(value="pattern")@DefaultValue(value="") String pattern, @QueryParam(value="showdeleted")@DefaultValue(value="false") boolean showdeleted)
size
- number of datasets per pagepage
- page number starting 0email
- email of creatorpattern
- filename pattern such as %.msh@GET @Path(value="{dataset-id}") @Produces(value="application/json") public Dataset getDataset(@PathParam(value="dataset-id") String datasetId)
datasetId
- id of dataset to retrieve@DELETE @Path(value="{dataset-id}") @Produces(value="application/json") public boolean deleteDataset(@PathParam(value="dataset-id")@DefaultValue(value="") String datasetId) throws Exception
datasetId
- id of dataset to deleteException
@PUT @Path(value="{dataset-id}/purge") public javax.ws.rs.core.Response purgeDataset(@PathParam(value="dataset-id")@DefaultValue(value="") String datasetId)
datasetId
- id of dataset to delete from repository@GET @Path(value="{dataset-id}/zip") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response getDatasetZip(@PathParam(value="dataset-id") String datasetId)
datasetId
- dataset Id@GET @Path(value="{dataset-id}/{filedescriptor-id}") @Produces(value="application/json") public FileDescriptor getFileDescriptor(@PathParam(value="dataset-id") String datasetId, @PathParam(value="filedescriptor-id") String fileDescriptorId)
datasetId
- dataset IdfileDescriptorId
- filedescriptor Id@GET @Path(value="{dataset-id}/{filedescriptor-id}/file") @Produces(value="application/octet-stream") public javax.ws.rs.core.Response getFile(@PathParam(value="dataset-id") String datasetId, @PathParam(value="filedescriptor-id") String fileDescriptorId)
id
- file-descriptor id@GET @Path(value="{dataset-id}/{filedescriptor-id}/delete") @Produces(value="application/json") public javax.ws.rs.core.Response deleteFile(@PathParam(value="dataset-id") String datasetId, @PathParam(value="filedescriptor-id") String fileDescriptorId)
id
- file-descriptor idCopyright © 2017. All rights reserved.