Custom XMP Metadata Definitions
OMN reads and writes XMP metadata that is embedded in assets based on a set of XMP property definitions. In addition to the definitions shipped with OMN, you can register your own custom XMP properties — for example to read or write project-specific fields.
|
In OMN6 custom XMP properties were registered by building a jar of Spring beans and adding it to the classpath. This mechanism was removed in OMN7. Custom properties are now defined in a single JSON file. See Migrating from OMN6 for how to convert existing definitions. |
The xmp-custom.json file
Custom definitions are read from a single file:
/usr/local/omn/config/xmp-custom.json
-
The directory is
${OMN_HOME}/config;OMN_HOMEdefaults to/usr/local/omn. -
Mount the file into both the
weband thesynccontainer — both load the definitions. -
Only this one file is evaluated. Its content is a single JSON array of definition objects.
Definition format
Each entry in the array describes one custom XMP property:
| Field | Required | Description |
|---|---|---|
|
yes |
Unique identifier in the form |
|
yes |
The XMP namespace URI the property belongs to (e.g. |
|
yes |
The property name within the namespace. |
|
yes |
The value type, written in uppercase. One of the |
|
no |
Free-text description of the property. |
|
no |
Name of the parent structure; only for properties that belong to a structured (nested) XMP type. |
The following example registers a single string property custom:MyField:
[
{
"namespace" : "http://ns.apollon.de/custom/1.0/",
"identifier" : "custom:MyField",
"type" : "STRING",
"name" : "MyField",
"description" : "Example custom XMP field"
}
]
Use a custom namespace
|
A custom property whose value is edited and saved through the OMN UI must use
your own namespace (for example |
Applying changes
-
Restart the
webandsynccontainers to load a changedxmp-custom.json. -
If the file is missing, OMN starts normally and uses only the built-in definitions.
-
If the file cannot be parsed, OMN logs an error and continues with the built-in definitions only — check the container log if a custom property does not appear.
Migrating from OMN6
In OMN6 each custom property was a Spring bean in
META-INF/omn/spring/xmp-definitions.xml, packaged as a jar. In OMN7 the same
fields are expressed as one JSON object per property. The field names are
identical, so the conversion is mechanical.
OMN6 (xmp-definitions.xml):
<bean class="com.meylemueller.xmp.XmpMetaDataDefinition">
<property name="namespace" value="http://ns.apollon.de/custom/1.0/"/>
<property name="identifier" value="custom:MyField"/>
<property name="type" value="STRING"/>
<property name="name" value="MyField"/>
<property name="description" value="Example custom XMP field"/>
</bean>
OMN7 (xmp-custom.json):
[
{
"namespace" : "http://ns.apollon.de/custom/1.0/",
"identifier" : "custom:MyField",
"type" : "STRING",
"name" : "MyField",
"description" : "Example custom XMP field"
}
]
To migrate:
-
Create one JSON object for each
<bean>, copying thenamespace,identifier,type,nameanddescriptionvalues. -
Collect all objects into the single array in
/usr/local/omn/config/xmp-custom.json. -
Remove the old jar — it is no longer loaded in OMN7.
-
If a migrated property is edited through the UI and used a controlled Adobe namespace (e.g.
exif), move it to your own namespace (see Use a custom namespace).