@Path(value="/objects") @Produces(value="application/json") public class ObjectsResource extends Object
Constructor and Description |
---|
ObjectsResource() |
Modifier and Type | Method and Description |
---|---|
Set<String> |
getIds()
Lists all object IDs on the imagej-server.
|
javax.ws.rs.core.Response |
getObject(String id,
String format,
javax.ws.rs.core.UriInfo uriInfo)
Retrieves an object in a specific format.
|
ObjectInfo |
getObjectInfo(String id)
Shows the information of an object.
|
void |
initialize(Context ctx)
Initialize resource by injection.
|
javax.ws.rs.core.Response |
removeObject(String id)
Removes one object from ObjectService.
|
com.fasterxml.jackson.databind.JsonNode |
uploadFile(InputStream fileInputStream,
org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail,
String typeHint)
Reads the user-uploaded file into the imagej runtime.
|
@Inject public void initialize(Context ctx)
ctx
- @GET public Set<String> getIds()
@GET @Path(value="{id}") public ObjectInfo getObjectInfo(@PathParam(value="id") String id)
id
- object ID@DELETE @Path(value="{id}") public javax.ws.rs.core.Response removeObject(@PathParam(value="id") String id)
id
- object ID to remove@POST @Path(value="upload") @Consumes(value="multipart/form-data") @Timed public com.fasterxml.jackson.databind.JsonNode uploadFile(InputStream fileInputStream, org.glassfish.jersey.media.multipart.FormDataContentDisposition fileDetail, @QueryParam(value="type") String typeHint)
If no hint for format is provided, filename would be used to guess the file format.
fileInputStream
- file stream of the uploaded filefileDetail
- "Content-Disposition" headertypeHint
- optional hint for file type@GET @Path(value="{id}/{format}") @Timed public javax.ws.rs.core.Response getObject(@PathParam(value="id") String id, @PathParam(value="format") String format, @Context javax.ws.rs.core.UriInfo uriInfo)
id
- object IDformat
- format of the object to be saved intouriInfo
- used for obtaining query parameters for configCopyright © 2014–2022 ImageJ. All rights reserved.