Class TikaAutoMetadataExtracter
- java.lang.Object
-
- org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
-
- org.alfresco.repo.content.metadata.TikaPoweredMetadataExtracter
-
- org.alfresco.repo.content.metadata.TikaAutoMetadataExtracter
-
- All Implemented Interfaces:
ContentWorker,MetadataEmbedder,MetadataExtracter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.context.ApplicationContextAware
public class TikaAutoMetadataExtracter extends TikaPoweredMetadataExtracter
A Metadata Extractor which makes use of the Apache Tika auto-detection to select the best parser to extract the metadata from your document. This will be used for all files which Tika can handle, but where no other more explicit extractor is defined.author: -- cm:author title: -- cm:title subject: -- cm:description created: -- cm:created comments: geo:lat: -- cm:latitude geo:long: -- cm:longitude
- Since:
- 3.4
- Author:
- Nick Burch
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.alfresco.repo.content.metadata.TikaPoweredMetadataExtracter
TikaPoweredMetadataExtracter.HeadContentHandler, TikaPoweredMetadataExtracter.MapCaptureContentHandler, TikaPoweredMetadataExtracter.NullContentHandler
-
Nested classes/interfaces inherited from interface org.alfresco.repo.content.metadata.MetadataExtracter
MetadataExtracter.OverwritePolicy
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Logloggerstatic java.util.ArrayList<java.lang.String>SUPPORTED_MIMETYPES-
Fields inherited from class org.alfresco.repo.content.metadata.TikaPoweredMetadataExtracter
documentSelector, KEY_AUTHOR, KEY_COMMENTS, KEY_CREATED, KEY_DESCRIPTION, KEY_SUBJECT, KEY_TAGS, KEY_TITLE
-
Fields inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
MEGABYTE_SIZE, NAMESPACE_PROPERTY_PREFIX, PROPERTY_COMPONENT_EMBED, PROPERTY_COMPONENT_EXTRACT, PROPERTY_PREFIX_METADATA
-
-
Constructor Summary
Constructors Constructor Description TikaAutoMetadataExtracter(org.apache.tika.config.TikaConfig tikaConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.io.Serializable>extractSpecific(org.apache.tika.metadata.Metadata metadata, java.util.Map<java.lang.String,java.io.Serializable> properties, java.util.Map<java.lang.String,java.lang.String> headers)Because some editors use JPEG_IMAGE_HEIGHT_TAG when saving JPEG images , a more reliable source for image size are the values provided by Tika and not the exif/tiff metadata read from the file This will override the tiff:Image size which gets embedded into the alfresco node properties for jpeg files that contain such exif informationprotected org.apache.tika.parser.ParsergetParser()Does auto-detection to select the best Tika Parser.-
Methods inherited from class org.alfresco.repo.content.metadata.TikaPoweredMetadataExtracter
buildParseContext, buildSupportedMimetypes, embedInternal, extractRaw, extractSize, getDocumentSelector, getEmbedder, getExtractorContext, getInputStream, getMetadataSeparator, makeDate, needHeaderContents, setDocumentSelector, setMetadataSeparator
-
Methods inherited from class org.alfresco.repo.content.metadata.AbstractMappingMetadataExtracter
checkIsEmbedSupported, checkIsSupported, embed, extract, extract, extract, filterSystemProperties, getBeanName, getDefaultEmbedMapping, getDefaultMapping, getEmbedMapping, getExecutorService, getLimits, getMapping, getMimetypeService, init, isEmbeddingSupported, isSupported, newRawMap, putRawValue, readEmbedMappingProperties, readEmbedMappingProperties, readGlobalEmbedMappingProperties, readGlobalExtractMappingProperties, readMappingProperties, readMappingProperties, register, setApplicationContext, setBeanName, setDictionaryService, setEmbedMapping, setEmbedMappingProperties, setEnableStringTagging, setExecutorService, setFailOnTypeConversion, setInheritDefaultEmbedMapping, setInheritDefaultMapping, setMapping, setMappingProperties, setMimetypeLimits, setMimetypeService, setOverwritePolicy, setProperties, setRegistry, setSupportedDateFormats, setSupportedEmbedMimetypes, setSupportedMimetypes
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.content.metadata.MetadataEmbedder
embed, isEmbeddingSupported
-
-
-
-
Method Detail
-
getParser
protected org.apache.tika.parser.Parser getParser()
Does auto-detection to select the best Tika Parser.- Specified by:
getParserin classTikaPoweredMetadataExtracter
-
extractSpecific
protected java.util.Map<java.lang.String,java.io.Serializable> extractSpecific(org.apache.tika.metadata.Metadata metadata, java.util.Map<java.lang.String,java.io.Serializable> properties, java.util.Map<java.lang.String,java.lang.String> headers)Because some editors use JPEG_IMAGE_HEIGHT_TAG when saving JPEG images , a more reliable source for image size are the values provided by Tika and not the exif/tiff metadata read from the file This will override the tiff:Image size which gets embedded into the alfresco node properties for jpeg files that contain such exif information- Overrides:
extractSpecificin classTikaPoweredMetadataExtracter
-
-