Interface FileMetadataExtractor


@ProviderType public interface FileMetadataExtractor
Service for extracting metadata from a file
  • Method Summary

    Modifier and Type
    Method
    Description
    Extract the metadata from the specified file and return the resulting metadata
    void
    Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource
    void
    updateMetadata(File file, boolean persist)
    Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource
  • Method Details

    • extractMetadata

      Map<String,Object> extractMetadata(File file) throws IOException
      Extract the metadata from the specified file and return the resulting metadata
      Parameters:
      file - the file from which to extract the metadata
      Returns:
      the metadata from the file
      Throws:
      IOException - an exception occurs extracting the metadata
    • updateMetadata

      void updateMetadata(File file) throws IOException
      Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource
      Parameters:
      file - the file to extract the metadata from
      Throws:
      IOException - an exception occurs updating the metadata
    • updateMetadata

      void updateMetadata(File file, boolean persist) throws IOException
      Extract the metadata from the specified file and persist the results under the jcr:content/metadata node of the file resource
      Parameters:
      file - the file to extract the metadata from
      persist - if true, persist the results, if not leave the changes unpersisted
      Throws:
      IOException - an exception occurs updating the metadata