Project

General

Profile

Actions

Task #24816

open

Task #24611: Create the new GRSF Publisher service

Task #25008: Requested fields changes

Change the content of 'refers_to'

Added by Luca Frosini about 2 years ago. Updated about 2 years ago.

Status:
Paused
Priority:
Normal
Target version:
Start date:
Mar 21, 2023
Due date:
% Done:

80%

Estimated time:

Description

Stock and Fishery records contain the fields refers_to.

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)


"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:


"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

Please note that if we agree on this, the change must be made when the new service will be available and not for the current implementation.


Files

Actions #1

Updated by Luca Frosini about 2 years ago

  • Description updated (diff)
Actions #2

Updated by Luca Frosini about 2 years ago

  • Description updated (diff)
Actions #3

Updated by Yannis Marketakis about 2 years ago

Hi @luca.frosini@isti.cnr.it .

Your proposal is absolutely fine by me.

Actions #4

Updated by Luca Frosini about 2 years ago

As I anticipated in #24817 we can't use the source as name for the resource because it clashes with the name of the resource generated by database_sources.

My opinion is also that using the source of the record as name confuses the user.

The initial ideas for an alternative resource name have issues:

  • source + id : e.g. RAM 2109694f-17d1-3206-815d-179bc52e5ec7 but I don't really like it.
  • semantic identifier to the target record. We must be sure that any record has a sematinc identifier. Unfortunately I don't find the semantic identifier of the target record https://data.d4science.org/ctlg/GRSF_Admin/2109694f-17d1-3206-815d-179bc52e5ec7
  • short name: unfortunately is not so short and the resource name has a maximum length of 100 characters (of course we can cut it)

So, @marketak@ics.forth.gr @aureliano.gentile@fao.org any other ideas?

Actions #5

Updated by Luca Frosini about 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50
Actions #6

Updated by Yannis Marketakis about 2 years ago

Overall I do not think we have a problem with the solution you initially proposed, because:

So I do not see that there is a possibility of a clash there

Actions #7

Updated by Luca Frosini about 2 years ago

Yannis Marketakis wrote in #note-6:

Overall I do not think we have a problem with the solution you initially proposed, because:

So I do not see that there is a possibility of a clash there

Ok now everything is clear. So the actual code was not wrong as I thought.

So I come back to my initial request, which avoid to lookup the target Record, i.e. having the name in the JSON instead the id.

Sorry, for my confusion

Actions #8

Updated by Luca Frosini about 2 years ago

I just had a call with @aureliano.gentile@fao.org and for the name of the Resource is fine having the source.

So, to summarise everything I kindly ask you if it is possible have the property refers_to as in the following example:


"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"
  } ]

Actions #9

Updated by Luca Frosini about 2 years ago

  • % Done changed from 50 to 80
Actions #10

Updated by Yannis Marketakis about 2 years ago

I confirm that we will change the objects for the refers_to records to show the name of the corresponding source, instead of the catalogue id, as suggested.

"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"
  } ]
Actions #11

Updated by Luca Frosini about 2 years ago

  • Tracker changed from Support to Task
  • Subject changed from About 'refers_to' to Change the content of 'refers_to'
  • Status changed from In Progress to Paused
  • Target version set to GRSF

As agreed with @marketak@ics.forth.gr I'm going to pause this ticket.
I'll ask to change the produced JSON to @marketak@ics.forth.gr as soon as ready with the new service.

Actions #12

Updated by Luca Frosini about 2 years ago

@marketak@ics.forth.gr @aureliano.gentile@fao.org Which String will you use for FAO SDG 14.4.1 Questionnaire referred record?
Even if there are not yet, maybe they can be in the future right?

@aureliano.gentile@fao.org do you want to align the name of the resource with the name used for Database Source see #24817 i.e.

  • "FishSource",
  • "Fisheries and Resources Monitoring System (FIRMS)",
  • "RAM Legacy Stock Assessment Database",
  • "FAO SDG 14.4.1 Questionnaire"

or do you want to keep the short name/acronym?

Actions #13

Updated by Aureliano Gentile about 2 years ago

Sorry, I do not understand where this will be displayed in the catalogue. Can you help me please?

Actions #16

Updated by Aureliano Gentile about 2 years ago

Thanks Luca, we spoke and agreed to adopt all names in full both in "database_sources" and in "refers_to".

Actions #17

Updated by Luca Frosini about 2 years ago

  • Parent task changed from #24611 to #25008
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)