Class XMPMetadataResource
- java.lang.Object
-
- org.apache.tika.server.core.resource.MetadataResource
-
- org.apache.tika.server.standard.resource.XMPMetadataResource
-
- All Implemented Interfaces:
TikaServerResource
public class XMPMetadataResource extends MetadataResource implements TikaServerResource
-
-
Constructor Summary
Constructors Constructor Description XMPMetadataResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.ws.rs.core.Response
getMetadata(InputStream is, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo info)
jakarta.ws.rs.core.Response
getMetadataField(InputStream is, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo info, String field)
Get a specific metadata field.jakarta.ws.rs.core.Response
getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att, jakarta.ws.rs.core.UriInfo info)
-
Methods inherited from class org.apache.tika.server.core.resource.MetadataResource
parseMetadata
-
-
-
-
Method Detail
-
getMetadataField
@PUT @Path("{field}") @Produces("application/rdf+xml") public jakarta.ws.rs.core.Response getMetadataField(InputStream is, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo info, @PathParam("field") String field) throws Exception
Description copied from class:MetadataResource
Get a specific metadata field. If the input stream cannot be parsed, but a value was found for the given metadata field, then the value of the field is returned as part of a 200 OK response; otherwise aResponse.Status.BAD_REQUEST
is generated. If the stream was successfully parsed but the specific metadata field was not found, then aResponse.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.- Overrides:
getMetadataField
in classMetadataResource
- Parameters:
is
- inputstreamhttpHeaders
- httpheadersinfo
- infofield
- the tika metadata field name- Returns:
- one of
Response.Status.OK
,Response.Status.NOT_FOUND
, orResponse.Status.BAD_REQUEST
- Throws:
Exception
-
getMetadataFromMultipart
@POST @Consumes("multipart/form-data") @Produces("application/rdf+xml") @Path("form") public jakarta.ws.rs.core.Response getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att, @Context jakarta.ws.rs.core.UriInfo info) throws Exception
- Overrides:
getMetadataFromMultipart
in classMetadataResource
- Throws:
Exception
-
getMetadata
@PUT @Produces("application/rdf+xml") public jakarta.ws.rs.core.Response getMetadata(InputStream is, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo info) throws Exception
- Overrides:
getMetadata
in classMetadataResource
- Throws:
Exception
-
-