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

Version 1 Next »

Relational metadata can be added in the collection hierarchy to define the relation between an asset (content/collection) and the folder to which it is linked. It is important to note that Relational metadata attributes have no correlation to the attributes of the asset (content/collection) being linked to the collection unit. Required attributes/properties can be defined in relational_metadata schema.json file.

Story: SB-22864 - Getting issue details... STATUS

Database Changes:

CASSANDRA - Script: ALTER TABLE hierarchy_store.content_hierarchy ADD relational_metadata text;

APIs Updated:

JOBs Updated: ‘content-publish’ flink job. 

Files Added/Updated:

Update Hierarchy API request sample:

{
   "request": {
       "data": {
           "nodesModified": {
               "do_11342063777635532812": {
                   "root": false,
                   "objectType": "Content",
                   "metadata": {
                        "name": "Collection Unit",
                        "contentType": "TextBookUnit",
                        "primaryCategory": "Textbook Unit",
                        "attributions": [],
                        "keywords": [
                            "UnitKW1",
                            "UnitKW2"
                        ]
                    },
                    "isNew": false
                },
                "do_11340096165525094411": {
                    "root": false,
                    "objectType": "Content",
                    "metadata": {
                        "name": "R1"
                    },
                    "isNew": false
                }
            },
            "hierarchy": {
                "do_11342063677881548811": {
                    "name": "Collection",
                    "children": [
                        "do_11342063777635532812"
                    ],
                    "root": true
                },
                "do_11342063777635532812": {
                    "name": "Collection Unit",
                    "children": [
                        "do_11342063777714176014",
                        "do_11340096165525094411"
                    ],
                    "relationalMetadata": {
                      "do_11340096165525094411": {
                        "relName": "R11"
                      }
                    },
                    "root": false
                },
                "do_11342063777714176014": {
                    "name": "L2 Folder",
                    "children": [
                        "do_11340096165525094411"
                    ],
                    "relationalMetadata": {
                      "do_11340096165525094411": {
                        "relName": "R21"
                      }
                    },
                    "root": false
                },
                "do_11340096165525094411": {
                    "name": "R1",
                    "children": [],
                    "root": false
                }
            },
            "lastUpdatedBy": "4cd4c690-eab6-4938-855a-447c7b1b8ea9"
        }
    }
}

No changes in the API response.

Read Hierarchy API:

  • No changes in the request.

  • Hierarchy response will return the ‘relational_metadata’ as part of the content metadata under the respective Unit.

Add children to Collection API request sample:

{
   "request": {
       "rootId": "do_11346541373852876811",
       "unitId": "do_11346581562140262413",
       "children": [
          "do_11340096165525094411",
          "do_11340096165525093316"
       ],
       "relationalMetadata": {
           "do_11340096165525094411": {
               "relName": "R21"
           },
           "do_11340096165525093316": {
               "relName": "Resource Relative Name"
           },
       }
   }
}

No changes in response.

 

Remove children from Collection API:

No changes in the request and response. Only processing logic has been updated.

  • No labels