public class MetadataEP extends Object
Constructor and Description |
---|
MetadataEP(javax.ws.rs.core.HttpHeaders httpHeaders,
javax.ws.rs.core.UriInfo info) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
getMetadata(InputStream is)
Get all metadata that can be parsed from the specified input stream.
|
javax.ws.rs.core.Response |
getMetadataField(String field,
InputStream is)
Get a specific metadata field.
|
javax.ws.rs.core.Response |
getSimpleMetadataField(String field,
InputStream is)
Get a specific TIKA metadata field as a simple text string.
|
public MetadataEP(@Context javax.ws.rs.core.HttpHeaders httpHeaders, @Context javax.ws.rs.core.UriInfo info)
public javax.ws.rs.core.Response getMetadata(InputStream is) throws Exception
is
- an input streamException
public javax.ws.rs.core.Response getSimpleMetadataField(String field, InputStream is) 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.
field
- the tika metadata field nameis
- the document streamResponse.Status.OK
, Response.Status.NOT_FOUND
, or
Response.Status.BAD_REQUEST
Exception
public javax.ws.rs.core.Response getMetadataField(String field, InputStream is) 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 than requested.
field
- the tika metadata field nameis
- the document streamResponse.Status.OK
, Response.Status.NOT_FOUND
, or
Response.Status.BAD_REQUEST
Exception
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.