XmpPackage class

XmpPackage class

Represents base abstraction for XMP package.

Inheritance: XmpPackageXmpMetadataContainerCustomPackageMetadataPackage

The XmpPackage type exposes the following members:

Constructors

Constructor Description
__init__(self, prefix, namespace_uri) Initializes a new instance of the XmpPackage class.

Properties

Property Description
metadata_type Gets the metadata type.
keys Gets a collection of the metadata property names.
property_descriptors Gets a collection of descriptors that contain information about properties accessible through the GroupDocs.Metadata search engine.
count Gets the number of metadata properties.
prefix Gets the xmlns prefix.
namespace_uri Gets the namespace URI.
xml_namespace Gets the XML namespace.

Methods

Method Description
set(self, name, value) Sets string property.
set(self, name, value) Sets integer property.
set(self, name, value) Sets boolean property.
set(self, name, value) Sets DateTime property.
set(self, name, value) Sets double property.
set(self, name, value) Sets the value inherited from XmpValueBase .
set(self, name, value) Sets the value inherited from XmpComplexType .
set(self, name, value) Sets the value inherited from XmpArray .
contains(self, property_name) Determines whether the package contains a metadata property with the specified name.
find_properties(self, specification) Finds the metadata properties satisfying a specification.
The search is recursive so it affects all nested packages as well.
update_properties(self, specification, value) Updates known metadata properties satisfying a specification.
The operation is recursive so it affects all nested packages as well.
remove_properties(self, specification) Removes metadata properties satisfying a specification.
add_properties(self, specification, value) Adds known metadata properties satisfying the specification.
The operation is recursive so it affects all nested packages as well.
set_properties(self, specification, value) Sets known metadata properties satisfying the specification.
The operation is recursive so it affects all nested packages as well.
This method is a combination of MetadataPackage.add_properties and MetadataPackage.update_properties.
If an existing property satisfies the specification its value is updated.
If there is a known property missing in the package that satisfies the specification it is added to the package.
sanitize(self) Removes writable metadata properties from the package.
The operation is recursive so it affects all nested packages as well.
get_xmp_representation(self) Converts the XMP value to the XML representation.
remove(self, name) Removes the property with the specified name.
clear(self) Removes all XMP properties.

Remarks

Learn more | | |

Example

This example demonstrates how to add a custom XMP package to a file of any supported format.

See Also