usnistgov / oar-pdr

The NIST Open Access to Research (OAR) Public Data Repository (PDR) system software
11 stars 10 forks source link

LPS: Fix bug determining proper resource type label #213

Closed RayPlante closed 2 years ago

RayPlante commented 2 years ago

This PR fixes a bug that prevents the landing page from properly indicating the resource type above the dataset title. Currently, all records are showing the type as "Data Resource", this value is displayed by default when the primary type is not recognized. A resource's primary type is the first element of the @type property in the NERDm record. The proper label is determined within the ResourceIdentityComponent via its determineResourceLabel() function. This function was not accessing the @type property properly. This PR fixes this bug and adds support for recognizing SRM datasets.

This is fix is currently deployed to oardev.

chuanlin2018 commented 2 years ago

Do we have a record with "nrd:SRM" type for testing? I was unable to find it... All other types work fine.

RayPlante commented 2 years ago

No, there are no such records; however, some are expected in the near future.