Skip to end of banner
Go to start of banner

Difference

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This feature is part of release 24.1

Introduction

When the metadata changes for a record Events of type UPDATE are generated. MediaHaven calculates the changes in the metadata and persistent those changes as property of the event.

Model

The change in metadata of a record is modelled as a list of changes to its Metadata Fields. Each change to a metadata field contains as a property the value before and after. Because the calculation of the difference is intrinsically linked with the Metadata Inheritance, the same rule applies, namely that the change is calculated per top field and concerns the complete field. For example when adding a keyword “C” to a record with existing keywords “A, B”, the value before is “A, B” and the value after is “A, B, C”.

Output

The difference is outputted in the following contexts

  1. The MediaHaven REST API endpoint events

  2. The OAI PMH API with format “mets-mhs-head”

  3. When exporting a record with the combine option ZipTree or requesting it with metadata in the format “mets-mhs-head”

  4. Visible in the front-ends MediaHaven 2.0 and MediaHaven Monitoring

JSON (output example)

{
  "Difference": [
    {   "DottedKey": "Descriptive.Keywords",
        "ValueBefore": {
            "Keyword": [
                "Beekje",
                "Leopoldskanaal"
            ]
        },
        "ValueAfter": {
            "Keyword": [
                "Beekje",
                "Leopoldskanaal",
                "Krekenroute"
            ]
        }
    },
    { "DottedKey": "Internal.ArchiveStatus",
      "ValueBefore": "in_progress",
      "ValueAfter": "on_disk"}
  ]
}

XML (output example)

<premis:eventDetailInformation>
	<premis:eventDetail>on_disk</premis:eventDetail>
	<premis:eventDetailExtension>
		<mhs:Difference xmlns:mhs="https://zeticon.mediahaven.com/metadata/24.1/mhs/">
			<mhs:MetadataFieldChange>
                <mhs:DottedKey>Descriptive.Keywords</mhs:DottedKey>
                <mhs:ValueBefore>
                    <mh:Keyword>Beekje</mh:Keyword>
                    <mh:Keyword>Leopoldskanaal</mh:Keyword>
                </mhs:ValueBefore>
                <mhs:ValueAfter>
                    <mh:Keyword>Beekje</mh:Keyword>
                    <mh:Keyword>Leopoldskanaal</mh:Keyword>
                    <mh:Keyword>Krekenroute</mh:Keyword>
                </mhs:ValueAfter>
            </mhs:MetadataFieldChange>
			<mhs:MetadataFieldChange>
				<mhs:DottedKey>Internal.ArchiveStatus</mhs:DottedKey>
				<mhs:ValueBefore>in_progress</mhs:ValueBefore>
				<mhs:ValueAfter>on_disk</mhs:ValueAfter>
			</mhs:MetadataFieldChange>
		</mhs:Difference>
  </premis:eventDetailExtension>
</premis:eventDetailInformation>

  • No labels