Class RecursiveMetadataResource
java.lang.Object
org.apache.tika.server.core.resource.RecursiveMetadataResource
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final BasicContentHandlerFactory.HANDLER_TYPE
protected static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
getMetadata
(InputStream is, jakarta.ws.rs.core.HttpHeaders httpHeaders, jakarta.ws.rs.core.UriInfo info, String handlerTypeName) Returns an InputStream that can be deserialized as a list ofMetadata
objects.jakarta.ws.rs.core.Response
getMetadataFromMultipart
(org.apache.cxf.jaxrs.ext.multipart.Attachment att, jakarta.ws.rs.core.UriInfo info, String handlerTypeName) Returns an InputStream that can be deserialized as a list ofMetadata
objects.parseMetadata
(InputStream is, Metadata metadata, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, jakarta.ws.rs.core.UriInfo info, HandlerConfig handlerConfig)
-
Field Details
-
HANDLER_TYPE_PARAM
- See Also:
-
DEFAULT_HANDLER_TYPE
-
-
Constructor Details
-
RecursiveMetadataResource
public RecursiveMetadataResource()
-
-
Method Details
-
parseMetadata
public static List<Metadata> parseMetadata(InputStream is, Metadata metadata, jakarta.ws.rs.core.MultivaluedMap<String, String> httpHeaders, jakarta.ws.rs.core.UriInfo info, HandlerConfig handlerConfig) throws Exception- Throws:
Exception
-
getMetadataFromMultipart
@POST @Consumes("multipart/form-data") @Produces("application/json") @Path("form{handler : (\\w+)?}") public jakarta.ws.rs.core.Response getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att, @Context jakarta.ws.rs.core.UriInfo info, @PathParam("handler") String handlerTypeName) throws Exception Returns an InputStream that can be deserialized as a list ofMetadata
objects. The first in the list represents the main document, and the rest represent metadata for the embedded objects. This works recursively through all descendants of the main document, not just the immediate children.The extracted text content is stored with the key
TikaCoreProperties.TIKA_CONTENT
.Specify the handler for the content (xml, html, text, ignore) in the path:
/rmeta/form (default: xml)
/rmeta/form/xml (store the content as xml)
/rmeta/form/text (store the content as text)
/rmeta/form/ignore (don't record any content) -
getMetadata
@PUT @Produces("application/json") @Path("{handler : (\\w+)?}") public jakarta.ws.rs.core.Response getMetadata(InputStream is, @Context jakarta.ws.rs.core.HttpHeaders httpHeaders, @Context jakarta.ws.rs.core.UriInfo info, @PathParam("handler") String handlerTypeName) throws Exception Returns an InputStream that can be deserialized as a list ofMetadata
objects. The first in the list represents the main document, and the rest represent metadata for the embedded objects. This works recursively through all descendants of the main document, not just the immediate children.The extracted text content is stored with the key
TikaCoreProperties.TIKA_CONTENT
.Specify the handler for the content (xml, html, text, ignore) in the path:
/rmeta (default: xml)
/rmeta/xml (store the content as xml)
/rmeta/text (store the content as text)
/rmeta/ignore (don't record any content)
-