Class ExifHandler

java.lang.Object
de.swa.gmaf.plugin.ExifHandler
All Implemented Interfaces:
GMAF_Plugin

public class ExifHandler
extends java.lang.Object
implements GMAF_Plugin
Exif Plugin based on Apache Commons Imaging
Author:
stefan_wagenpfeil
  • Constructor Summary

    Constructors 
    Constructor Description
    ExifHandler()  
  • Method Summary

    Modifier and Type Method Description
    static void attachFeatureVector​(java.io.File f, MMFG fv)
    attaches a MMFG to the exif metadata
    boolean canProcess​(java.lang.String extension)
    returns true, if one of the extensions is jpg, jpeg, png, tiff, or gif
    java.util.Vector<Node> getDetectedNodes()
    this method is called by the GMAF to receive the results of this plugin and to fuse it into the MMFG
    static MMFG getFeatureVectorFromExif​(java.io.File f)
    extracts a MMFG from the exif data, if it is contained within
    boolean isGeneralPlugin()
    returns always true
    void process​(java.net.URL url, java.io.File f, byte[] bytes, MMFG fv)
    processes the asset
    boolean providesRecoursiveData()
    returns always false, as exif is not recursive

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • canProcess

      public boolean canProcess​(java.lang.String extension)
      returns true, if one of the extensions is jpg, jpeg, png, tiff, or gif
      Specified by:
      canProcess in interface GMAF_Plugin
      Returns:
      true or false
    • getFeatureVectorFromExif

      public static MMFG getFeatureVectorFromExif​(java.io.File f)
      extracts a MMFG from the exif data, if it is contained within
    • attachFeatureVector

      public static void attachFeatureVector​(java.io.File f, MMFG fv)
      attaches a MMFG to the exif metadata
    • process

      public void process​(java.net.URL url, java.io.File f, byte[] bytes, MMFG fv)
      processes the asset
      Specified by:
      process in interface GMAF_Plugin
      Parameters:
      url - represents the temporary URL of the Multimedia asset to be process
      f - represents the temporary file of the asset to be processed
      bytes - contains the file's bytes
      fv - represents the current MMFG, where the results of this plugin should be fused into
    • isGeneralPlugin

      public boolean isGeneralPlugin()
      returns always true
      Specified by:
      isGeneralPlugin in interface GMAF_Plugin
      Returns:
      true, if it is a general plugin
    • providesRecoursiveData

      public boolean providesRecoursiveData()
      returns always false, as exif is not recursive
      Specified by:
      providesRecoursiveData in interface GMAF_Plugin
      Returns:
      true, if recursive data is available
    • getDetectedNodes

      public java.util.Vector<Node> getDetectedNodes()
      Description copied from interface: GMAF_Plugin
      this method is called by the GMAF to receive the results of this plugin and to fuse it into the MMFG
      Specified by:
      getDetectedNodes in interface GMAF_Plugin
      Returns:
      a vector of MMFG nodes