com.groupdocs.metadata.core

Interfaces

Classes

Enums

Exceptions

com.groupdocs.metadata.core

Interface IIptc

  • All Known Implementing Classes:
    JpegRootPackage, PsdRootPackage, TiffRootPackage


    public interface IIptc

    Represents base operations intended to work with IPTC metadata. Please find more information at <a href="http://en.wikipedia.org/wiki/International_Press_Telecommunications_Council">http://en.wikipedia.org/wiki/International_Press_Telecommunications_Council</a>.

    Learn more

    This example shows how to read basic IPTC metadata properties.

    
     try (Metadata metadata = new Metadata(Constants.JpegWithIptc)) {
         IIptc root = (IIptc) metadata.getRootPackage();
         if (root.getIptcPackage() != null) {
             if (root.getIptcPackage().getEnvelopeRecord() != null) {
                 System.out.println(root.getIptcPackage().getEnvelopeRecord().getDateSent());
                 System.out.println(root.getIptcPackage().getEnvelopeRecord().getDestination());
                 System.out.println(root.getIptcPackage().getEnvelopeRecord().getFileFormat());
                 System.out.println(root.getIptcPackage().getEnvelopeRecord().getFileFormatVersion());
                 // ...
             }
             if (root.getIptcPackage().getApplicationRecord() != null) {
                 System.out.println(root.getIptcPackage().getApplicationRecord().getHeadline());
                 System.out.println(root.getIptcPackage().getApplicationRecord().getByLine());
                 System.out.println(root.getIptcPackage().getApplicationRecord().getByLineTitle());
                 System.out.println(root.getIptcPackage().getApplicationRecord().getCaptionAbstract());
                 System.out.println(root.getIptcPackage().getApplicationRecord().getCity());
                 System.out.println(root.getIptcPackage().getApplicationRecord().getDateCreated());
                 System.out.println(root.getIptcPackage().getApplicationRecord().getReleaseDate());
                 // ...
             }
         }
     }
     
    • Method Detail

      • getIptcPackage

        IptcRecordSet getIptcPackage()

        Gets the IPTC metadata package associated with the file.

        Returns:
        The IPTC metadata package associated with the file.
      • setIptcPackage

        void setIptcPackage(IptcRecordSet value)

        Sets the IPTC metadata package associated with the file.

        Parameters:
        value - The IPTC metadata package associated with the file.