Skip to end of banner
Go to start of banner

Record Tree

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 6 Next »

Introduction

For DigiHaven we have introduced a record tree with metadata inheritance, where metadata is inherited from the top the tree, to the children below.

For MediaHaven 2.0 will be gradually moving from the flat structure to full tree structure as for DigiHaven as shown in the tree below

Tree

Business Logic

  • A record can have

    • no parent

      • top record such as a Series or Classification

      • orphaned record which can later be adopted.

    • exactly one parent

  • No loops are allowed within the tree

    • A record cannot be parent or child of itself

    • A record cannot be adopted by one of its (grand)children or (grand)parents

Inheritance

  • Metadata field definitions can be marked as inheriting.

  • When a record is created or adopted under a parent record, the inheriting metadata fields will be copied from the parent to the child record

  • When the metadata changes of a parent record then the changes made to inheriting metadata fields will propagate to its children asynchronously

Structural Metadata (from 21.1)

The structural metadata for record tree is encoded using metadata fields ReferenceCodes and ParentRecordId

From child to parent

The metadata field ParentRecordId provides the RecordId of its parent.

From child to grandparents

The field ReferenceCodes contains the full line of ancestors. The sub fields are in the exact order of the grandparents from top to bottom with as key the RecordType of the (grand)parent as value the RecordId of the (grand)parent.

{
   "Structural": {
      "ReferenceCodes": {
         "Series": ["3e3b17c058b14ed79095c7fc9c4af88848bd7afbc5294c19a214625a5a5d3d7d"],
         "Dossier": ["6b83485cfe1f48729ab493f912b2c7cc6336afdc597843e7bcaf664abd209043"],
         "Document":["120b5fe7f7a346bca277e13988ed96224f40330432584955b6e33b524321dff5"]
      }
   }
}

From parent to direct children

  • Make a search request on the field ParentRecordId

  • Form +Structural.ParentRecordId:<my RecordId>

  • Example +Structural.ParentRecordId:3e3b17...

From parent to all (grand)children

  • Make a search request using the matching sub field of ReferenceCodes

  • Form +Structural.ReferenceCodes.<my RecordType>:<my RecordId>

  • Example all (grand)children of particular Series: +Structural.ReferenceCodes.Series:3e3b17...

  • No labels