From b16f37b1ae27ded585c46f7ef18ef3b03c6daf8e Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 17 Mar 2023 19:02:38 +0100 Subject: [PATCH] Improved profile definition to have the required information --- .../profile_schemas/grsf_profile.xsd | 29 +++-- .../resources/profile_schemas/profile5.xsd | 17 ++- .../resources/profiles/AssessmentUnit.xml | 116 ++++++++++++++---- 3 files changed, 119 insertions(+), 43 deletions(-) diff --git a/src/test/resources/profile_schemas/grsf_profile.xsd b/src/test/resources/profile_schemas/grsf_profile.xsd index 3e97c65..f093320 100644 --- a/src/test/resources/profile_schemas/grsf_profile.xsd +++ b/src/test/resources/profile_schemas/grsf_profile.xsd @@ -20,7 +20,15 @@ - + + + + + + + + + @@ -59,14 +67,17 @@ - - - - - - - - + + + + + + + + + + + diff --git a/src/test/resources/profile_schemas/profile5.xsd b/src/test/resources/profile_schemas/profile5.xsd index ebbdead..85cdf96 100644 --- a/src/test/resources/profile_schemas/profile5.xsd +++ b/src/test/resources/profile_schemas/profile5.xsd @@ -119,15 +119,7 @@ - - - - - - - - + @@ -170,6 +162,13 @@ + + + + + + diff --git a/src/test/resources/profiles/AssessmentUnit.xml b/src/test/resources/profiles/AssessmentUnit.xml index 9308a84..2395968 100644 --- a/src/test/resources/profiles/AssessmentUnit.xml +++ b/src/test/resources/profiles/AssessmentUnit.xml @@ -3,7 +3,7 @@ - GRSF Type + GRSF Type true String 1 @@ -49,16 +49,18 @@ Field + + It generates a Resource for each element of the array. + - + Database Source false String 1 - A list of elements of the type {"name": "a name", "description": "a description", "url": "http://...."}. Name and url are mandatory. For the attribute name there is a controlled vocabulary: FIRMS, RAM, FishSource. Example: "database_sources": [{"name":"FIRMS", "description": "unknown", "url":"http://....."}, ...] database_sources @@ -82,9 +84,15 @@ aggregated false + Field Resource - It generates a Resource with the content of refers_to input field. No metadata field is created. + + A list of elements of the type {"name": "a name", "description": "a description", "url": "http://...."}. + Name and url are mandatory. For the attribute name there is a controlled vocabulary: FIRMS, RAM, FishSource. + Example: "database_sources": [{"name":"FIRMS", "description": "unknown", "url":"http://....."}, ...]. + It generates a Resource for each element of the array. + @@ -94,7 +102,6 @@ false String 1 - A list of elements of the type {"name": "a name", "description": "a description", "url": "http://...."}. Name and url are mandatory. Example: "source_of_information" : [{"name":"...", "description": "...", "url":"http://....."},...] source_of_information @@ -120,7 +127,12 @@ Resource - It generates a Resource with the content of refers_to input field. No metadata field is created. + + A list of elements of the type {"name": "a name", "description": "a description", "url": "http://...."}. + Name and url are mandatory. + Example: "source_of_information" : [{"name":"...", "description": "...", "url":"http://....."},...]. + It generates a Resource with the content of refers_to input field. No metadata field is created. + @@ -130,7 +142,6 @@ false String 1 - A list of objects of the format {"url": "http://", "id": "..."} that allows the aggregated GRSF records to point to their source records already published in the catalogue. The URL and the id are both mandatory and are the ones returned by the services when a source record is published. Example: Check the record http://data.d4science.org/ctlg/GRSF_Admin/f82393dd-d23a-3c26-98d3-ccc5f7910266 The JSON submitted by KB contains: "refers_to" : [ { "id" : "c29b2485-c33f-3c03-8790-55a1dcf045ed", "url" : "http://data.d4science.org/ctlg/GRSF_Admin/c29b2485-c33f-3c03-8790-55a1dcf045ed"}]. The reference is in the generated resource FIRMS. refers_to @@ -152,7 +163,15 @@ Resource - It generates a Resource with the content of refers_to input field. No metadata field is created. + + It generates a Resource with the content of refers_to input field. + A list of objects of the format {"url": "http://", "id": "..."} that allows the aggregated GRSF records to point to their source records already published in the catalogue. + The URL and the id are both mandatory and are the ones returned by the services when a source record is published. + Example: Check the record http://data.d4science.org/ctlg/GRSF_Admin/f82393dd-d23a-3c26-98d3-ccc5f7910266. + The JSON submitted by KB contains: "refers_to" : [ { "id" : "c29b2485-c33f-3c03-8790-55a1dcf045ed", "url" : "http://data.d4science.org/ctlg/GRSF_Admin/c29b2485-c33f-3c03-8790-55a1dcf045ed"}]. + The reference is in the generated resource FIRMS. + No metadata field is created. + @@ -162,7 +181,6 @@ false String 1 - . Example: American Plaice NAFO-5YZ - https://data.d4science.org/ctlg/GRSF_Admin/f6342402-b5fb-3457-9b49-c0a018f2ce72 short_name @@ -174,6 +192,10 @@ Field + + Example: "American Plaice NAFO-5YZ". + Check the record https://data.d4science.org/ctlg/GRSF_Admin/f6342402-b5fb-3457-9b49-c0a018f2ce72. + @@ -195,7 +217,7 @@ sdg_flag - String + Boolean true false @@ -211,7 +233,6 @@ false String 1 - Controlled vocabulary: Pending, Rejected, Confirmed, Archived, Hidden, Merged (i.e. when the aggregated record comes out from more than one source record) Pending Rejected @@ -224,13 +245,23 @@ status_grsf_record - String + + Pending + Rejected + Confirmed + Archived + Hidden + Merged + aggregated false Field + + Controlled vocabulary: Pending, Rejected, Confirmed, Archived, Hidden, Merged (i.e. when the aggregated record comes out from more than one source record) + @@ -240,7 +271,6 @@ false String * - A time series of value, unit and date. Example: "catches": [{"unit" : "...", "value": "...", "year": "..."}, ...] catch-group @@ -257,6 +287,11 @@ TimeSeries + + A time series of value, unit and date. Example: "catches": [{"unit" : "...", "value": "...", "year": "..."}, ...] + It generate a Resource containing all the content of the input field (i.e. a TimeSeries) + and as many Field as the number of element in the JsonArray. + @@ -266,7 +301,6 @@ false String * - A time series of value, unit and date. Example: "landings": [{"unit" : "...", "value": "...", "year": "..."}, ...] landing-group @@ -283,39 +317,71 @@ TimeSeries + + A time series of value, unit and date. Example: "landings": [{"unit" : "...", "value": "...", "year": "..."}, ...] + It generate a Resource containing all the content of the input field (i.e. a TimeSeries) + and as many Field as the number of element in the JsonArray. + -