@Path(value="/rmeta") public class RecursiveMetadataResource extends Object
Modifier and Type | Field and Description |
---|---|
protected static BasicContentHandlerFactory.HANDLER_TYPE |
DEFAULT_HANDLER_TYPE |
protected static String |
HANDLER_TYPE_PARAM |
Constructor and Description |
---|
RecursiveMetadataResource() |
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,
String handlerTypeName)
Returns an InputStream that can be deserialized as a list of
Metadata objects. |
javax.ws.rs.core.Response |
getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att,
javax.ws.rs.core.UriInfo info,
String handlerTypeName)
Returns an InputStream that can be deserialized as a list of
Metadata objects. |
static List<Metadata> |
parseMetadata(InputStream is,
Metadata metadata,
javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
javax.ws.rs.core.UriInfo info,
HandlerConfig handlerConfig) |
protected static final String HANDLER_TYPE_PARAM
protected static final BasicContentHandlerFactory.HANDLER_TYPE DEFAULT_HANDLER_TYPE
public static List<Metadata> parseMetadata(InputStream is, Metadata metadata, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, javax.ws.rs.core.UriInfo info, HandlerConfig handlerConfig) throws Exception
Exception
@POST @Consumes(value="multipart/form-data") @Produces(value="application/json") @Path(value="form{handler : (\\w+)?}") public javax.ws.rs.core.Response getMetadataFromMultipart(org.apache.cxf.jaxrs.ext.multipart.Attachment att, @Context javax.ws.rs.core.UriInfo info, @PathParam(value="handler") String handlerTypeName) throws Exception
Metadata
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)
@PUT @Produces(value="application/json") @Path(value="{handler : (\\w+)?}") public javax.ws.rs.core.Response getMetadata(InputStream is, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context javax.ws.rs.core.UriInfo info, @PathParam(value="handler") String handlerTypeName) throws Exception
Metadata
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)
Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.