public class TikaMetadataExtractor extends Object implements MetadataExtractor<org.apache.tika.metadata.Metadata>
MetadataExtractor that uses Apache Tika to parse binary files.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
mapping
The mapping of Apache Tika properties to extract
|
protected String[] |
supportedMimeTypes
The list of mime types that can be handled by this extractor
|
| Constructor and Description |
|---|
TikaMetadataExtractor() |
| Modifier and Type | Method and Description |
|---|---|
void |
extract(org.springframework.core.io.Resource resource,
org.apache.tika.metadata.Metadata metadata,
Map<String,Object> properties)
Takes relevant metadata from the source object to the properties parameter
|
protected boolean |
isSupported(org.apache.tika.metadata.Metadata metadata)
Indicates if the given metadata can be handled by this extractor
|
void |
setMapping(Map<String,Object> mapping) |
void |
setSupportedMimeTypes(String[] supportedMimeTypes) |
protected String[] supportedMimeTypes
public void setSupportedMimeTypes(String[] supportedMimeTypes)
protected boolean isSupported(org.apache.tika.metadata.Metadata metadata)
metadata - the metadata to checkpublic void extract(org.springframework.core.io.Resource resource,
org.apache.tika.metadata.Metadata metadata,
Map<String,Object> properties)
extract in interface MetadataExtractor<org.apache.tika.metadata.Metadata>resource - the original file containing the metadata (in case any extra operation is needed)metadata - the object that provides the metadataproperties - the properties that will be indexedCopyright © 2023 CrafterCMS. All rights reserved.