@Path(value="/meta") public class MetadataResource extends Object
Constructor and Description |
---|
MetadataResource() |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
getMetadata(InputStream is,
javax.ws.rs.core.HttpHeaders httpHeaders,
javax.ws.rs.core.UriInfo info) |
javax.ws.rs.core.Response |
getMetadataField(InputStream is,
javax.ws.rs.core.HttpHeaders httpHeaders,
javax.ws.rs.core.UriInfo info,
String field)
Get a specific metadata field.
|
javax.ws.rs.core.Response |
getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att,
javax.ws.rs.core.UriInfo info) |
@POST @Consumes(value="multipart/form-data") @Produces(value={"text/csv","application/json","application/rdf+xml"}) @Path(value="form") public javax.ws.rs.core.Response getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att, @Context javax.ws.rs.core.UriInfo info) throws Exception
Exception
@PUT @Produces(value={"text/csv","application/json","application/rdf+xml"}) public javax.ws.rs.core.Response getMetadata(InputStream is, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context javax.ws.rs.core.UriInfo info) throws Exception
Exception
@PUT @Path(value="{field}") @Produces(value={"text/csv","application/json","application/rdf+xml","text/plain"}) public javax.ws.rs.core.Response getMetadataField(InputStream is, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context javax.ws.rs.core.UriInfo info, @PathParam(value="field") String field) throws Exception
Response.Status.BAD_REQUEST
is generated. If the stream was successfully
parsed but the specific metadata field was not found, then a
Response.Status.NOT_FOUND
is returned.
Note that this method handles multivalue fields and returns possibly more
metadata value than requested.
If you want XMP, you must be careful to specify the exact XMP key.
For example, "Author" will return nothing, but "dc:creator" will return the correct value.is
- inputstreamhttpHeaders
- httpheadersinfo
- infofield
- the tika metadata field nameResponse.Status.OK
, Response.Status.NOT_FOUND
, or
Response.Status.BAD_REQUEST
Exception
Copyright © 2007–1969 The Apache Software Foundation. All rights reserved.