exiv2._properties
XMP key class and data attributes.
Classes
Category of an XMP property. |
|
Concrete keys for XMP metadata. |
|
Structure mapping XMP namespaces and (preferred) prefixes. |
|
XMP property reference, implemented as a static class. |
|
Information about one XMP property. |
- class XmpCategory
Bases:
IntEnum
Category of an XMP property.
- External = 1
- Internal = 0
- xmpExternal = 1
- xmpInternal = 0
- class XmpKey
Bases:
SwigPyObject
Concrete keys for XMP metadata.
- clone()
- familyName()
- groupName()
Return the name of the group (the second part of the key). For XMP keys, the group name is the schema prefix name.
- key()
- ns()
Return the schema namespace for the prefix of the key
- tag()
Properties don’t have a tag number. Return 0.
- tagDesc()
- tagLabel()
- tagName()
- class XmpNsInfo
Bases:
SwigPyObject
Structure mapping XMP namespaces and (preferred) prefixes.
- desc_
Brief description of the namespace
- items()
Get structure members.
- keys()
Get structure member names.
- ns_
Namespace
- prefix_
(Preferred) prefix
- xmpPropertyInfo_
List of known properties
- class XmpProperties
Bases:
SwigPyObject
XMP property reference, implemented as a static class.
- static ns()
Return the namespace name for the schema associated with prefix.
- Parameters:
prefix (str) – Prefix
- Return type:
- Returns:
The namespace name
- Raises:
Exiv2Error
if no namespace is registered with prefix.
- static nsDesc()
Return the namespace description for the schema associated with prefix.
- Parameters:
prefix (str) – Prefix
- Return type:
string
- Returns:
The namespace description
- Raises:
Exiv2Error
if no namespace is registered with prefix.
- static nsInfo()
Return information about a schema namespace for prefix. Always returns a valid pointer.
- Parameters:
prefix (str) – The prefix
- Return type:
- Returns:
A pointer to the related information
- Raises:
Exiv2Error
if no namespace is registered with prefix.
- static prefix()
Return the (preferred) prefix for schema namespace ns.
- static propertyDesc()
Return the description of the property.
- Parameters:
key (
XmpKey
) – The property key- Return type:
string
- Returns:
The description of the property, 0 if the key is of an unknown property.
- static propertyInfo()
Return information for the property for key.
If the key is a path to a nested property (one which contains a slash, like
Xmp.MP.RegionInfo/MPRI:Regions)
, determines the innermost element (Xmp.MPRI.Regions)
and returns its property information.- Parameters:
key (
XmpKey
) – The property key- Return type:
- Returns:
A pointer to the property information, 0 if the key is of an unknown property.
- static propertyList()
Return read-only list of built-in properties for prefix.
- Parameters:
prefix (str) – Prefix
- Return type:
- Returns:
Pointer to the built-in properties for prefix, may be 0 if none is configured in the namespace info.
- Raises:
Exiv2Error
if no namespace is registered with prefix.
- static propertyTitle()
Return the title (label) of the property.
- Parameters:
key (
XmpKey
) – The property key- Return type:
string
- Returns:
The title (label) of the property, 0 if the key is of an unknown property.
- static propertyType()
Return the type for property key. The default for unknown keys is xmpText.
- static registerNs()
Register namespace ns with preferred prefix prefix.
If the prefix is a known or previously registered prefix, the corresponding namespace URI is overwritten.
Note
This invalidates XMP keys generated with the previous prefix.
- static registeredNamespaces()
Get all registered namespaces (for both Exiv2 and XMPsdk)
- static unregisterNs()
Overload 1:
Unregister a custom namespace ns.
The function only has an effect if there is a namespace ns registered earlier, it does not unregister built-in namespaces.
Note
This invalidates XMP keys generated in this namespace.
Overload 2:
Unregister all custom namespaces.
The function only unregisters namespaces registered earlier, it does not unregister built-in namespaces.
Note
This invalidates XMP keys generated in any custom namespace.
- class XmpPropertyInfo
Bases:
SwigPyObject
Information about one XMP property.
- desc_
Property description
- items()
Get structure members.
- keys()
Get structure member names.
- name_
Property name
- title_
Property title or label
- typeId_
Exiv2 default type for the property
- xmpCategory_
Category (internal or external)
- xmpValueType_
XMP value type (for info only)