Interface XMPHandler


  • public interface XMPHandler
    The XMPHandler interface defines the functionality needed to read and write XMP meta info to and from Asset. There can be only one active implementation at any given time. Highest ranked service will be used if more than one implementations are available.
    • Method Detail

      • isSupported

        boolean isSupported​(java.lang.String mimeType)
        Checks if the provided mime type is supported by the implementation
        Parameters:
        mimeType - to be checked
        Returns:
        true if the given mime type is supported
      • readXmp

        @Deprecated
        XMPMeta readXmp​(Asset asset)
                 throws java.io.IOException
        Deprecated.
        Read xmp packet from the original binary
        Parameters:
        asset - asset to read xmp from
        Returns:
        XMPMeta
        Throws:
        java.io.IOException - if fails to read xmp
      • readXmpMetadata

        XMPMetadata readXmpMetadata​(Asset asset)
                             throws java.io.IOException
        Read xmp packet from the original binary
        Parameters:
        asset - asset to read xmp metadata from
        Returns:
        XMPMetaData
        Throws:
        java.io.IOException - if fails to read xmp
      • writeXmp

        void writeXmp​(Asset asset,
                      byte[] xmpBytes)
               throws java.io.IOException
        Write xmp bytes back to the original binary
        Parameters:
        asset - asset to write xmp bytes back to
        xmpBytes - xmp bytes to be written back
        Throws:
        java.io.IOException - if fails to write back xmp to the binary
      • writeXmp

        @Deprecated
        void writeXmp​(Asset asset,
                      XMPMeta xmpMeta)
               throws java.io.IOException
        Deprecated.
        Write xmp meta back to the original binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMeta - object
        Throws:
        java.io.IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      byte[] xmpBytes,
                      boolean createVersion)
               throws java.io.IOException
        Write xmp bytes back to the original binary
        Parameters:
        asset - asset asset to write xmp bytes back to
        xmpBytes - xmp bytes to be written back
        createVersion - if true then create versions of the asset on each writeback
        Throws:
        java.io.IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      XMPMeta xmpMeta,
                      boolean createVersion)
               throws java.io.IOException
        Write xmp meta back to the original binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMeta - object
        createVersion - if true then create versions of the asset on each writeback
        Throws:
        java.io.IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      byte[] xmpBytes,
                      XMPWriteBackOptions writeBackOptions)
               throws java.io.IOException
        Write xmp bytes back to the original/renditions' binary
        Parameters:
        asset - asset to write xmp bytes back to
        xmpBytes - xmp bytes to be written back
        writeBackOptions - the XMP write back options
        Throws:
        java.io.IOException - if fails to write back xmp to the binary
      • writeXmpMetadata

        void writeXmpMetadata​(Asset asset,
                              XMPMetadata xmpMetadata,
                              XMPWriteBackOptions writeBackOptions)
                       throws java.io.IOException
        Write xmp meta back to the original binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMetadata - object
        writeBackOptions - the XMP write back options
        Throws:
        java.io.IOException - if fails to write back xmp to the binary
      • writeXmp

        void writeXmp​(Asset asset,
                      XMPMeta xmpMeta,
                      XMPWriteBackOptions writeBackOptions)
               throws java.io.IOException
        Write xmp meta back to the original/renditions' binary
        Parameters:
        asset - asset to write xmp meta back to
        xmpMeta - object
        writeBackOptions - the XMP write back options
        Throws:
        java.io.IOException - if fails to write back xmp to the binary