com.groupdocs.metadata.core

Interfaces

Classes

Exceptions

com.groupdocs.metadata.core

Interface IXmp

  • All Known Implementing Classes:
    AsfRootPackage, AviRootPackage, FlvRootPackage, GifRootPackage, Jpeg2000RootPackage, JpegRootPackage, MP3RootPackage, PdfRootPackage, PngRootPackage, PsdRootPackage, TiffRootPackage, WavRootPackage, WebPRootPackage


    public interface IXmp

    Defines base operations intended to work with XMP metadata.

    This example demonstrates how to extract XMP metadata from a file.

    try (Metadata metadata = new Metadata(Constants.PngWithXmp)) {
         IXmp root = (IXmp) metadata.getRootPackage();
         if (root.getXmpPackage() != null) {
             if (root.getXmpPackage().getSchemes().getXmpBasic() != null) {
                 System.out.println(root.getXmpPackage().getSchemes().getXmpBasic().getCreatorTool());
                 System.out.println(root.getXmpPackage().getSchemes().getXmpBasic().getCreateDate());
                 System.out.println(root.getXmpPackage().getSchemes().getXmpBasic().getModifyDate());
                 System.out.println(root.getXmpPackage().getSchemes().getXmpBasic().getLabel());
                 System.out.println(root.getXmpPackage().getSchemes().getXmpBasic().getNickname());
                 // ...
             }
             if (root.getXmpPackage().getSchemes().getDublinCore() != null) {
                 System.out.println(root.getXmpPackage().getSchemes().getDublinCore().getFormat());
                 System.out.println(root.getXmpPackage().getSchemes().getDublinCore().getCoverage());
                 System.out.println(root.getXmpPackage().getSchemes().getDublinCore().getIdentifier());
                 System.out.println(root.getXmpPackage().getSchemes().getDublinCore().getSource());
                 // ...
             }
             if (root.getXmpPackage().getSchemes().getPhotoshop() != null) {
                 System.out.println(root.getXmpPackage().getSchemes().getPhotoshop().getColorMode());
                 System.out.println(root.getXmpPackage().getSchemes().getPhotoshop().getIccProfile());
                 System.out.println(root.getXmpPackage().getSchemes().getPhotoshop().getCountry());
                 System.out.println(root.getXmpPackage().getSchemes().getPhotoshop().getCity());
                 System.out.println(root.getXmpPackage().getSchemes().getPhotoshop().getDateCreated());
                 // ...
             }
             // ...
         }
     }
     
    • Method Detail

      • getXmpPackage

        XmpPacketWrapper getXmpPackage()

        Gets the XMP metadata package.

        Returns:
        The XMP metadata package.
      • setXmpPackage

        void setXmpPackage(XmpPacketWrapper value)

        Sets the XMP metadata package.

        Parameters:
        value - The XMP metadata package.