Task #24816
Updated by Luca Frosini about 2 years ago
Stock and Fishery records contain the fields `refers_to`. `refers_to` and `database_sources`. As an example, please consider the following the Stock Record (Assessment Unit) from GRSF with GRSF UUID cb468fb0-fed5-370f-9bc6-08fa99c54f3c. https://data.d4science.org/ctlg/GRSF_Admin/cb468fb0-fed5-370f-9bc6-08fa99c54f3c Please find attached the json submitted by the KB in June 2021 (maybe it is not the latest version but this is not important to present the situation) ``` javascript "refers_to" : [ { "id" : "2109694f-17d1-3206-815d-179bc52e5ec7", "url" : "https://data.d4science.org/ctlg/GRSF_Admin/2109694f-17d1-3206-815d-179bc52e5ec7" }, { "id" : "c0d7d44f-71cb-3b28-9b65-ddf72c57d44f", "url" : "https://data.d4science.org/ctlg/GRSF_Admin/c0d7d44f-71cb-3b28-9b65-ddf72c57d44f" }, { "id" : "1b3ce0de-1ed1-3ba8-8a80-f866b287617e", "url" : "https://data.d4science.org/ctlg/GRSF_Admin/1b3ce0de-1ed1-3ba8-8a80-f866b287617e" } ] ``` Currently grsf-publisher-ws service uses `refers_to` to: * Generate a Resource with as name the name of the source of the record. The source is discovered by lookup the resource pointed by the URL. I'm wondering if we can avoid this lookup and have the name in the JSON in place of the id (which is useless). `refers_to` will be something like: ``` javascript "refers_to" : [ { "name" : "RAM", "url" : "https://data.d4science.org/ctlg/GRSF_Admin/2109694f-17d1-3206-815d-179bc52e5ec7" }, { "name" : "FishSource", "url" : "https://data.d4science.org/ctlg/GRSF_Admin/c0d7d44f-71cb-3b28-9b65-ddf72c57d44f" }, { "name" : "FIRMS", "url" : "https://data.d4science.org/ctlg/GRSF_Admin/1b3ce0de-1ed1-3ba8-8a80-f866b287617e" } ] ``` Moreover, maybe the name of the source is not very useful, and we can use a more significant name as we are doing for `referring_stock_record` and `referring_fishery_record` in the traceability unit see #24610