Class 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
    • Field Detail

      • logger

        protected static org.apache.commons.logging.Log logger
      • SUPPORTED_MIMETYPES

        public static java.util.ArrayList<java.lang.String> SUPPORTED_MIMETYPES
    • Constructor Detail

      • TikaAutoMetadataExtracter

        public TikaAutoMetadataExtracter​(org.apache.tika.config.TikaConfig tikaConfig)
    • Method Detail

      • 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:
        extractSpecific in class TikaPoweredMetadataExtracter