IXmp
public interface IXmp
Defines base operations intended to work with XMP metadata.
Learn more
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()); // … } // … } }
Methods
Method | Description |
---|---|
getXmpPackage() | Gets the XMP metadata package. |
setXmpPackage(XmpPacketWrapper value) | Sets the XMP metadata package. |
getXmpPackage()
public abstract XmpPacketWrapper getXmpPackage()
Gets the XMP metadata package.
Returns: XmpPacketWrapper - The XMP metadata package.
setXmpPackage(XmpPacketWrapper value)
public abstract void setXmpPackage(XmpPacketWrapper value)
Sets the XMP metadata package.
Parameters:
Parameter | Type | Description |
---|---|---|
value | XmpPacketWrapper | The XMP metadata package. |