public class XMPMetadataResource extends MetadataResource implements TikaServerResource
| Constructor and Description | 
|---|
| XMPMetadataResource() | 
| 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) | 
parseMetadata@PUT
 @Path(value="{field}")
 @Produces(value="application/rdf+xml")
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
MetadataResourceResponse.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.getMetadataField in class MetadataResourceis - inputstreamhttpHeaders - httpheadersinfo - infofield - the tika metadata field nameResponse.Status.OK,
 Response.Status.NOT_FOUND, or
 Response.Status.BAD_REQUESTException@POST
 @Consumes(value="multipart/form-data")
 @Produces(value="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
getMetadataFromMultipart in class MetadataResourceException@PUT @Produces(value="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
getMetadata in class MetadataResourceExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.