Difference between revisions of "GCube Data Catalogue for GRSF"

From Gcube Wiki
Jump to: navigation, search
m (How To Publish a GRSF product using JAVA)
(Traceability Unit Metadata)
 
(362 intermediate revisions by 4 users not shown)
Line 9: Line 9:
 
Apart from the default set of metadata, each type of product will also have specific fields. Some of them will also become automatically tags of the product. The same reasoning applies for group associations. In fact a set of groups was already available and each product will be automatically associated to them during publication, if that is the case. Fields that fire tags creation or groups association are documented below.
 
Apart from the default set of metadata, each type of product will also have specific fields. Some of them will also become automatically tags of the product. The same reasoning applies for group associations. In fact a set of groups was already available and each product will be automatically associated to them during publication, if that is the case. Fields that fire tags creation or groups association are documented below.
  
The publication phase is performed by means of a RESTful service whose publish methods accept JSON objects.
+
The publication phase is performed by means of a RESTful service whose publish methods accept JSON objects. The service allows also to publish records belonging to the original source records (i.e., "RAM", "FishSource" and "FIRMS") on which the aggregated GRSF records are build.
 
== Metadata ==
 
== Metadata ==
  
=== Common Metadata ===
+
=== Base Metadata ===
  
 
The following table shows the set of ''core'' metadata, that is the ones shared by both Stock and Fishery types. Some of them are automatically filled. The values given to some fields are automatically used to tag the product. Check the 'Is Tag' column of the table below. Other fields have a controlled vocabulary (that is, they can assume values selected from a defined set), and the value assigned to these fields allow to automatically determine to which group assign the product. Check the 'Is Group' column below.  
 
The following table shows the set of ''core'' metadata, that is the ones shared by both Stock and Fishery types. Some of them are automatically filled. The values given to some fields are automatically used to tag the product. Check the 'Is Tag' column of the table below. Other fields have a controlled vocabulary (that is, they can assume values selected from a defined set), and the value assigned to these fields allow to automatically determine to which group assign the product. Check the 'Is Group' column below.  
 +
 +
The table also reports the column '''Type''' that shows how the field is mapped into the product, once it is published within the catalogue, i.e. as a ''simple field'' (key/value pair, possibly repeatable) or a ''resource'' (an object with a mandatory name, an optional description and a mandatory url).
 +
 +
'''IMPORTANT''': ''Any other field that doesn't match one of the below ones will be managed as an object having a key and a value, both of String type, and attached to the product as a simple field.''
  
 
{| class="wikitable"
 
{| class="wikitable"
! style="font-weight: bold;" | Name
+
! style="text-align: center; font-weight: bold;" | Name
! style="font-weight: bold;" | Api Name (JSON)
+
! style="text-align: center; font-weight: bold;" | Api Name (JSON)
! style="font-weight: bold;" | Is Tag
+
! style="text-align: center; font-weight: bold;" | Display Section
! style="font-weight: bold;" | Is Group
+
! style="text-align: center; font-weight: bold;" | Is Tag
! style="font-weight: bold;" | Example
+
! style="text-align: center; font-weight: bold;" | Is Group
! style="font-weight: bold;" | Guidelines/Comments
+
! style="text-align: center; font-weight: bold;" | Is Sensitive
 +
! style="text-align: center; font-weight: bold;" | Example
 +
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 +
|-
 +
| Title
 +
| ''stock_name''
 +
''fishery_name''
 +
 
 +
''traceability_unit_name''
 +
| Top of the record
 +
| No
 +
| No
 +
| No
 +
|
 +
|
 
|-
 
|-
 
| Description
 
| Description
| description
+
| N/A
 +
| Top of the record
 
| No
 
| No
 
| No
 
| No
| This product contains attributes of ...
+
| No
| A brief description of the dataset written in plain language. It should provide a sufficiently comprehensive overview of the resource for anyone to understand its content origins and any continuing work on it.
+
| It is generated with this template:
 +
<pre>
 +
Short Name: ${short_name}
 +
GRSF Semantic Identifier: ${grsf_semantic_identifier}
 +
Record URL: ${record_url}
 +
</pre>
 +
|
 
|-
 
|-
| License *
+
| License  
 
| license_id
 
| license_id
 +
| Right panel
 +
| No
 
| No
 
| No
 
| No
 
| No
 
| CC-BY-SA-4.0
 
| CC-BY-SA-4.0
| style="font-style: italic;" | The list of licenses' ids can be retrieved by using the service (see below). By default the CC-BY-SA-4.0 will be used.
+
|  
 
|-
 
|-
 
| Author
 
| Author
| author
+
| N/A
 +
| Management Info
 +
| No
 
| No
 
| No
 
| No
 
| No
| Bloggs, Joe
+
| Joe Blogg
| style="font-style: italic;" | This field is automatically compiled by using the information of the caller entity.  
+
| This field is automatically compiled by using  
 +
the information of the caller.
 
|-
 
|-
 
| Author contact
 
| Author contact
| author_contact
+
| N/A
 +
| Management Info
 +
| No
 
| No
 
| No
 
| No
 
| No
 
| joe.blogg@example.com
 
| joe.blogg@example.com
| style="font-style: italic;" | This field is automatically compiled by using the information of the caller entity
+
| This field is automatically compiled by using  
 +
the information of the caller.
 +
|-
 +
| Version
 +
| version
 +
| Management Info
 +
| No
 +
| No
 +
| No
 +
| 1.0
 +
|
 
|-
 
|-
 
| Maintainer
 
| Maintainer
| maintainer
+
| N/A
 +
| Management Info
 +
| No
 
| No
 
| No
 
| No
 
| No
| A person: Bloggs, Joe. An authority: D4Science
+
| Joe Blogg
| Mantainer of the dataset
+
| This field is automatically compiled by using
 +
the information of the caller.
 
|-
 
|-
 
| Maintainer Contact
 
| Maintainer Contact
| maintainer_contact
+
| N/A
 +
| Management Info
 
| No
 
| No
 
| No
 
| No
| joe@example.com
+
| No
| Contact details of the resource maintainer.
+
| joe.blogg@example.com
 +
| This field is automatically compiled by using
 +
the information of the caller.  
 +
|}
 +
 
 +
=== Common Metadata ===
 +
 
 +
Besides the above common metadata, the following attributes are captured for stock, fisheries, and traceability unit records.
 +
 
 +
{| class="wikitable"
 +
! style="text-align: center; font-weight: bold;" | Name
 +
! style="text-align: center; font-weight: bold;" | Api Name (JSON)
 +
! style="text-align: center; font-weight: bold;" | Display Section
 +
! style="text-align: center; font-weight: bold;" | Is Tag
 +
! style="text-align: center; font-weight: bold;" | Is Group
 +
! style="text-align: center; font-weight: bold;" | Is Sensitive
 +
! style="text-align: center; font-weight: bold;" | Type
 +
! style="text-align: center; font-weight: bold;" | Example
 +
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 
|-
 
|-
| Version
+
| N/A
| version
+
| source
 +
| N/A
 
| No
 
| No
 +
| Yes
 +
<pre>
 +
if(source == 'GRSF')
 +
  'grsf-group'
 +
else
 +
  legacy-group'
 +
</pre>
 
| No
 
| No
| 1.0
+
| N/A
| Increase manually after editing
+
| "source" : "grsf". Valid values are: ''firms'', ''fishsource'', ''grsf'', ''ram'', ''sdg''.
 +
| When the value is ''grsf'' the system type of the record is defined by ''grsf_type'' property. Otherwise, the system type is ''Legacy''.
 
|-
 
|-
| Catches or landings
+
| GRSF Type
| catches_or_landings
+
| grsf_type
 +
| Stock/Fishery/Traceability Unit Identity
 +
| Yes
 
| No
 
| No
 
| No
 
| No
| Catch - 18962 - ton - 2014
+
| Field
| A combination of value, unit and date
+
|
 +
| It is also used as system type when the source is ''grsf''
 +
|-
 +
| Short Name
 +
| short_name
 +
| Stock/Fishery/Traceability Unit Identity
 +
| No
 +
| No
 +
| No
 +
| Field
 +
|
 +
|
 +
|-
 +
| GRSF Semantic Identifier
 +
| grsf_semantic_identifier
 +
| Stock/Fishery/Traceability Unit Identity +  Top of the record
 +
| No
 +
| No
 +
| No
 +
| Field
 +
|
 +
|
 
|-
 
|-
| Database Sources *
+
| Database Source
 
| database_sources
 
| database_sources
 +
| Stock/Fishery/Traceability Unit Identity
 
| No
 
| No
 +
| Yes only for GRSF records
 +
| No
 +
| Field (repeatable)
 +
| "database_sources": [ "FishSource", "Fisheries and Resources Monitoring System (FIRMS)", "RAM Legacy Stock Assessment Database", "FAO SDG 14.4.1 Questionnaire" ]
 +
|
 +
|-
 +
| Species
 +
| species
 +
| Stock/Fishery/Traceability Unit Identity
 
| Yes
 
| Yes
| {"name":"FIRMS", "description": "unknown", "url":"http://....."}
+
| No
| A list of elements of the type {"name": "a name", "description": "a description", "url": "http://...."}. Name and url are mandatory.
+
| No
For the attribute ''name'' there is a controlled vocabulary: FIRMS, RAM, FishSource
+
| Field (repeatable)
 +
|
 +
|
 
|-
 
|-
| Source of Information *
+
| Domain
| source_of_information
+
| N/A
 +
| Record Info
 
| No
 
| No
 +
| Yes (Stock or Fishery).
 
| No
 
| No
| {"name":"...", "description": "...", "url":"http://....."}
+
| Field
| A list of elements of the type {"name": "a name", "description": "a description", "url": "http://...."}. Name and url are mandatory.
+
|
 +
|  
 
|-
 
|-
| Data owner
+
| GRSF UUID
| data_owner
+
| grsf_uuid
 +
| Record Info
 
| No
 
| No
 
| No
 
| No
| IATTC
+
| No
 +
| Field
 
|  
 
|  
 +
|
 +
|-
 +
| Citation
 +
| citation
 +
| Record Info + Top Button
 +
| No
 +
| No
 +
| No
 +
| Field
 +
|
 +
|
 +
|-
 +
| Annotation
 +
| annotations
 +
| Record Info
 +
| No
 +
| No
 +
| Yes
 +
| Field (repeatable)
 +
|
 +
|
 +
|-
 +
| Record URL
 +
| N/A
 +
| Record Info
 +
| No
 +
| No
 +
| No
 +
| Field
 +
|
 +
| Added by the GRSF Publisher service
 
|}
 
|}
''mandatory fields are marked with an asterisk (*)''
 
  
=== Stock Metadata ===
+
=== Stock and Fishery Common Metadata ===
 +
 
  
The Stock product type also supports the following list of fields.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! style="text-align: center; font-weight: bold;" | Name
 
! style="text-align: center; font-weight: bold;" | Name
! style="text-align: center; font-weight: bold;" | API Name
+
! style="text-align: center; font-weight: bold;" | Api Name (JSON)
 +
! style="text-align: center; font-weight: bold;" | Display Section
 
! style="text-align: center; font-weight: bold;" | Is Tag
 
! style="text-align: center; font-weight: bold;" | Is Tag
 
! style="text-align: center; font-weight: bold;" | Is Group
 
! style="text-align: center; font-weight: bold;" | Is Group
 +
! style="text-align: center; font-weight: bold;" | Is Sensitive
 +
! style="text-align: center; font-weight: bold;" | Type
 
! style="text-align: center; font-weight: bold;" | Example
 
! style="text-align: center; font-weight: bold;" | Example
 
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 
|-
 
|-
| Stock Name *
+
| Similar GRSF Record
| stock_name
+
| similar_grsf_records
 +
| Stock/Fishery Identity
 +
| No
 
| No
 
| No
 
| No
 
| No
| Skipjack tuna - Eastern Pacific
+
| Field (repeatable)
| The title of the product. It is expected to be a unique name.
+
|
 +
|
 
|-
 
|-
| Stock ID
+
| Connected Stock Record / Connected Fishery Record
| stock_id
+
| connected
 +
| Stock/Fishery Identity
 
| No
 
| No
 
| No
 
| No
| SKJ- EPO
+
| No
 +
| Field (repeatable)
 +
|
 
|  
 
|  
 
|-
 
|-
| Type
+
| Data Owner
| type
+
| data_owner
 +
| Stock/Fishery Data
 +
| No
 +
| No
 
| Yes
 
| Yes
 +
| Field (repeatable)
 +
|
 +
|
 +
|-
 +
| Catch
 +
| catches
 +
| Stock/Fishery Data
 +
| No
 +
| Yes (Catch)
 
| Yes
 
| Yes
| Assessment Unit
+
| TimeSeries
| style="font-style: italic;" | Controlled vocabulary: Assessment Unit, Resource
+
|  
 +
|  
 
|-
 
|-
| Species Scientific Name *
+
| Landing
| species_scientific_name
+
| landings
 +
| Stock/Fishery Data
 +
| No
 +
| Yes (Landing)
 
| Yes
 
| Yes
 +
| TimeSeries
 +
|
 +
|
 +
|-
 +
| SDG Flag
 +
| sdg_flag
 +
| Record Info
 +
| No
 +
| Yes (only if the value is true)
 
| No
 
| No
| Katsuwonus pelamis (or SKJ)
+
| Field
 +
|
 
|  
 
|  
 
|-
 
|-
| Assessment distribution area *
+
| Status of the Record
| assessment_distribution_area
+
| status_grsf_record
 +
| Record Info
 +
| No
 
| No
 
| No
 
| No
 
| No
| East Pacific Ocean
+
| Field
 +
|
 
|  
 
|  
 
|-
 
|-
| Exploiting Fishery
+
| spatial
| exploiting_fishery
+
| spatial
 +
| Record Info
 +
| No
 
| No
 
| No
 
| No
 
| No
| Tunas and billfishes fishery
+
| Field
 
|  
 
|  
 +
| Due to plugin constraints, the key must be spatial. The portlet visualizes it as "Geospatial"
 
|-
 
|-
| Management entity
+
| N/A
| management_entity
+
| source_of_information
 +
| Data and Resources
 
| No
 
| No
 
| No
 
| No
| DFO
+
| No
 +
| Resource
 +
|
 
|  
 
|  
 
|-
 
|-
| Assessment methods
+
| N/A
| assessment_methods
+
| refers_to
 +
| Data and Resources
 
| No
 
| No
 
| No
 
| No
| Analytical assessment
+
| No
 +
| Resource
 +
|
 
|  
 
|  
 
|-
 
|-
| State of marine resources
+
| N/A
| state_of_marine_resource
+
| connections_indicator
 +
| N/A
 +
| Yes (connected, not connected)
 
| No
 
| No
 
| No
 
| No
 +
| N/A
 
|  
 
|  
 
|  
 
|  
 
|-
 
|-
| Exploitation Rate
+
| N/A
| exploitation_rate
+
| similarities_indicator
 +
| N/A
 +
| Yes ("with similar records", "without similar records")
 
| No
 
| No
 +
| No
 +
| N/A
 +
|
 +
|
 +
|}
 +
 +
=== Stock Metadata ===
 +
 +
The Stock record type also supports the following list of fields.
 +
 +
{| class="wikitable"
 +
! style="text-align: center; font-weight: bold;" | Name
 +
! style="text-align: center; font-weight: bold;" | Api Name (JSON)
 +
! style="text-align: center; font-weight: bold;" | Display Section
 +
! style="text-align: center; font-weight: bold;" | Is Tag
 +
! style="text-align: center; font-weight: bold;" | Is Group
 +
! style="text-align: center; font-weight: bold;" | Is Sensitive
 +
! style="text-align: center; font-weight: bold;" | Type
 +
! style="text-align: center; font-weight: bold;" | Example
 +
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 +
|-
 +
| GRSF Stock Name
 +
| stock_name
 +
| Stock Identity + Top of the record
 +
| No
 +
| No
 +
| No
 +
| Field
 +
|
 +
|
 +
|-
 +
| Assessment Area
 +
| assessment_area
 +
| Stock Identity
 
| Yes
 
| Yes
| Moderate fishing mortality
+
| No
| style="font-style: italic;" | Controlled vocabulary: Moderate fishing mortality, High fishing mortality, No or low fishing mortality
+
| No
 +
| Field (repeatable)
 +
|
 +
|
 
|-
 
|-
| Abundance level
+
| Intersecting FAO Major Fishing Areas
| abundance_level
+
| hidden_assessment_area
 +
| Stock Identity
 +
| Yes
 
| No
 
| No
 
| Yes
 
| Yes
| Intermediate abundance
+
| Field (repeatable)
| style="font-style: italic;" | Controlled vocabulary: Intermediate abundance, Low abundance, Uncertain/Not assessed
+
|  
 +
|
 
|-
 
|-
| Narrative state and trend
+
| Assessment Method
| narrative_state_and_trend
+
| assessment_methods
 +
| Stock Data
 
| No
 
| No
 +
| Yes (Group name: "Assessment Method")
 +
| Yes
 +
| TimeSeries
 +
|
 +
|
 +
|-
 +
| Abundance Level (FIRMS Standard)
 +
| firms_standard_abundance_level
 +
| Stock Data
 
| No
 
| No
| Stock size and fishing pressure are considered to be close to their value at MSY.
+
| Yes (Group name: "Abundance Level (FIRMS Standard)")
| A textual description
+
| Yes
 +
| TimeSeries
 +
|
 +
|  
 
|-
 
|-
| Scientific advice
+
| Abundance Level
| scientific_advice
+
| abundance_level
 +
| Stock Data
 
| No
 
| No
 +
| Yes (Group name: "Abundance Level")
 +
| Yes
 +
| TimeSeries
 +
|
 +
|
 +
|-
 +
| Biomass
 +
| biomass
 +
| Stock Data
 
| No
 
| No
| The indices of abundance from two longline fleets available for this stock present divergent trends over the last few years, the differences observed in targeting are not fully explained.
+
| Yes (Group name: "Biomass")
| A textual description
+
| Yes
 +
| TimeSeries
 +
|
 +
|  
 
|-
 
|-
| Reporting entity
+
| Fishing Pressure (FIRMS Standard)
| reporting_entity
+
| firms_standard_fishing_pressure
 +
| Stock Data
 
| No
 
| No
 +
| Yes (Group name: "Fishing Pressure (FIRMS Standard)")
 +
| Yes
 +
| TimeSeries
 +
|
 +
|
 +
|-
 +
| Fishing Pressure
 +
| fishing_pressure
 +
| Stock Data
 
| No
 
| No
| GRP3
+
| Yes (Group name: "Fishing Pressure")
 +
| Yes
 +
| TimeSeries
 +
|
 
|  
 
|  
 
|-
 
|-
| Reporting year
+
| State and Trend
| reporting_year
+
| state_and_trend_of_marine_resources
 +
| Stock Data
 
| No
 
| No
 +
| Yes (Group name: "State and Trend")
 +
| Yes
 +
| TimeSeries
 +
|
 +
|
 +
|-
 +
| FAO Stock Status Category
 +
| fao_categories
 +
| Stock Data
 
| No
 
| No
| 2005
+
| Yes (Group name: "FAO Stock Status Category")
 +
| Yes
 +
| TimeSeries
 +
|
 
|  
 
|  
 
|-
 
|-
| Status *
+
| Scientific Advice
| status
+
| scientific_advice
 +
| Stock Data
 +
| No
 +
| Yes (Group name: "Scientific Advice")
 
| Yes
 
| Yes
 +
| TimeSeries
 +
|
 +
|
 +
|-
 +
| Assessor
 +
| assessor
 +
| Stock Data
 
| No
 
| No
| Pending
+
| No
| style="font-style: italic;" | Controlled vocabulary: Pending, Confirmed.
+
| Yes
 +
| Field
 +
|
 +
|  
 
|}
 
|}
 
''mandatory fields are marked with an asterisk (*)''
 
  
 
=== Fishery Metadata ===
 
=== Fishery Metadata ===
  
The Fishery product type also supports the following list of fields.  
+
The Fishery record type also supports the following list of fields.  
  
 
{| class="wikitable"
 
{| class="wikitable"
 
! style="text-align: center; font-weight: bold;" | Name
 
! style="text-align: center; font-weight: bold;" | Name
! style="text-align: center; font-weight: bold;" | API Name
+
! style="text-align: center; font-weight: bold;" | Api Name (JSON)
 +
! style="text-align: center; font-weight: bold;" | Display Section
 
! style="text-align: center; font-weight: bold;" | Is Tag
 
! style="text-align: center; font-weight: bold;" | Is Tag
 
! style="text-align: center; font-weight: bold;" | Is Group
 
! style="text-align: center; font-weight: bold;" | Is Group
 +
! style="text-align: center; font-weight: bold;" | Is Sensitive
 +
! style="text-align: center; font-weight: bold;" | Type
 
! style="text-align: center; font-weight: bold;" | Example
 
! style="text-align: center; font-weight: bold;" | Example
 
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 
|-
 
|-
| Fishery Name *
+
| GRSF Fishery Name  
 
| fishery_name
 
| fishery_name
 +
| Fishery Identity + Top of the record
 
| No
 
| No
 
| No
 
| No
| NAFO Flemish Cap groundfish fisheries
+
| No
| This will be the title of the product and a unique name will be generated starting from this.
+
| Field
 +
|
 +
|  
 
|-
 
|-
| Fishery ID
+
| Traceability Flag
| fishery_id
+
| traceability_flag
 +
| Fishery Identity
 
| No
 
| No
 +
| Yes (only if the value is true)
 
| No
 
| No
| COD - 21.3.M - NAFO - OTB - CAN - Industrial
+
| Field
 +
|
 
|  
 
|  
 
|-
 
|-
| Type
+
| Fishing Area
| type
+
| fishing_area
 +
| Fishery Identity
 
| Yes
 
| Yes
| Yes
+
| No
| Fishery Activity
+
| No
| style="font-style: italic;" | Controlled vocabulary: Fishery Activity, Fishing Description
+
| Field (repeatable)
 +
|
 +
|
 
|-
 
|-
| Scientific Name
+
| Intersecting FAO Major Fishing Areas
| scientific_name
+
| hidden_fishing_area
 +
| Fishery Identity
 
| Yes
 
| Yes
 
| No
 
| No
| Caribbean spiny lobster
+
| Yes
 +
| Field (repeatable)
 
|  
 
|  
 +
|
 
|-
 
|-
| Fishing area
+
| Jurisdiction Area
| fishing_area
+
| jurisdiction_area
 +
| Fishery Identity
 +
| Yes
 
| No
 
| No
 
| No
 
| No
| North Atlantic
+
| Field (repeatable)
| '''If missing then Jurisdiction Area cannot be null'''
+
|
 +
|  
 
|-
 
|-
| Exploited stocks
+
| Flag State
| exploited_stocks
+
| flag_state
 +
| Fishery Identity
 +
| Yes
 
| No
 
| No
 
| No
 
| No
| Capelin - Southern Grand Bank
+
| Field (repeatable)
 
|  
 
|  
 +
 
|-
 
|-
| Management entity
+
| Fishing Gear
| management_entity
+
| fishing_gear
 +
| Fishery Identity
 
| Yes
 
| Yes
 
| No
 
| No
| European Union
+
| No
 +
| Field (repeatable)
 +
|
 
|  
 
|  
 
|-
 
|-
| Jurisdiction Area
+
| Management Body/Authority
| jurisdiction_area
+
| management_body_authorities
 +
| Fishery Identity
 
| No
 
| No
 
| No
 
| No
| Senegal
+
| No
| '''If missing then Fishing Area cannot be null'''
+
| Field (repeatable)
 +
|
 +
|  
 
|-
 
|-
| Production system type
+
| Resources Exploited
| production_system_type
+
| resources_exploited
 +
| Fishery Identity
 
| No
 
| No
 +
| No
 +
| No
 +
| Field (repeatable)
 +
|
 +
|
 +
|}
 +
 +
 +
 +
=== Traceability Unit Metadata ===
 +
 +
The Traceability Unit record type also supports the following list of fields.
 +
 +
{| class="wikitable"
 +
! style="text-align: center; font-weight: bold;" | Name
 +
! style="text-align: center; font-weight: bold;" | Api Name (JSON)
 +
! style="text-align: center; font-weight: bold;" | Display Section
 +
! style="text-align: center; font-weight: bold;" | Is Tag
 +
! style="text-align: center; font-weight: bold;" | Is Group
 +
! style="text-align: center; font-weight: bold;" | Is Sensitive
 +
! style="text-align: center; font-weight: bold;" | Type
 +
! style="text-align: center; font-weight: bold;" | Example
 +
! style="text-align: center; font-weight: bold;" | Guidelines/Comments
 +
|-
 +
| GRSF Traceability Unit Name
 +
| traceability_unit_name
 +
| Traceability Unit Identity + Top of the record
 +
| No
 +
| No
 +
| No
 +
| Field
 +
| Scomber scombrus - 27.3 - European Commission - Lithuania - Midwater trawls
 +
| The semantic title of the record.
 +
|-
 +
| Assessment Area
 +
| assessment_area
 +
| Traceability Unit Identity
 
| Yes
 
| Yes
| Industrial
+
| No
| Controlled vocabulary: Subsistence, Recreational, Commercial, Artisanal, Semi-industrial, Industrial, Exploratory_fishery, Unspecified
+
| No
 +
| Field (repeatable)
 +
| Code: 27.5.b, System: fao, Name: Faroes Grounds (Division 27.5.b)
 +
| The assessment areas of the record.
 
|-
 
|-
| Flag state
+
| Management/Reporting Area
| flag_state
+
| management_reporting_area
 +
| Traceability Unit Identity
 
| Yes
 
| Yes
|  
+
| No
| ESP
+
| No
| style="font-style: italic;" |  
+
| Field (repeatable)
 +
| Code: 27.5.b, System: fao, Name: Faroes Grounds (Division 27.5.b)
 +
| The management reporting areas of the record.
 +
|-
 +
| Flag State
 +
| flag_state
 +
| Traceability Unit Identity
 +
| Yes
 +
| No
 +
| No
 +
| Field (repeatable)
 +
| Code: LTU, System: iso3, Name: Lithuania
 +
| The flag state of the record.
 
|-
 
|-
| Fishing gear
+
| Fishing Gear
 
| fishing_gear
 
| fishing_gear
 +
| Traceability Unit Identity
 
| Yes
 
| Yes
 
| No
 
| No
| PUN
+
| No
| style="font-style: italic;" |  
+
| Field (repeatable)
 +
| Code: 03.29, System: isscfg, Name: Midwater trawls
 +
| The fishing gear of the record.
 
|-
 
|-
| Environment
+
| Management Body/Authority
| environment
+
| management_body_authorities
 +
| Traceability Unit Identity
 
| No
 
| No
 
| No
 
| No
|  
+
| No
|  
+
| Field (repeatable)
 +
| Code: authority:INT:EC, System: grsf-org, Name: European Commission
 +
| The management authority of the record.
 
|-
 
|-
| Status *
+
| Connected Stock Record
| status
+
| referring_stock_record
 +
| Traceability Unit Identity
 
| No
 
| No
| Yes
+
| No
| Pending
+
| No
| style="font-style: italic;" | Controlled vocabulary: Pending, Confirmed.  
+
| Field
 +
| https://data.d4science.org/ctlg/GRSF_Admin/9b36373a-ea6d-336a-8e0d-567555080aa4
 +
| The connected GRSF stock record.
 +
|-
 +
| Stock Record
 +
| referring_stock_record
 +
| Data and Resources
 +
| No
 +
| No
 +
| No
 +
| Resource
 +
| https://data.d4science.org/ctlg/GRSF_Admin/9b36373a-ea6d-336a-8e0d-567555080aa4
 +
| The connected GRSF stock record.
 +
|-
 +
| Connected Fishery Record
 +
| referring_fishery_record
 +
| Traceability Unit Identity
 +
| No
 +
| No
 +
| No
 +
| Field
 +
| https://data.d4science.org/ctlg/GRSF_Admin/0f440877-7f8c-4f05-b74d-8ec3469075bd
 +
| The connected GRSF fishery record.
 +
|-
 +
| Connected Fishery Record
 +
| referring_fishery_record
 +
| Data and Resources
 +
| No
 +
| No
 +
| No
 +
| Resource
 +
| https://data.d4science.org/ctlg/GRSF_Admin/0f440877-7f8c-4f05-b74d-8ec3469075bd
 +
| The connected GRSF fishery record.
 +
|-
 +
| Traceability Unit URI
 +
| traceability_record_uri
 +
| Data and Resources
 +
| No
 +
| No
 +
| No
 +
| Resource
 +
| https://github.com/grsf/resource/traceability_unit/b0423ecd-311c-33c4-ab6d-62cfb6f2806b
 +
| The unique URI of the Traceability Unit based on the GRSF UUID standard.
 
|}
 
|}
 
mandatory fields are marked with an asterisk (*)
 
  
 
== GRSF Publication Web Service ==
 
== GRSF Publication Web Service ==
Publication of products is performed by means of a RESTful web service. Each call to the service requires the security token of the user for the context in which he wish to publish or exploit the other functionalities. Please note that in case of product publication it is needed that the user has enough privileges. The list of roles and associated privileges for the catalogue users is reported [https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue#Users.2C_Roles_and_Groups here]. The VRE Manager assignes them.
+
 
 +
'''This guide is related to DEPRECATED grsf-publisher-ws service.'''
 +
 
 +
Records publication is performed by means of a RESTful web service running over SmartGears. Almost every call to the service requires the security token of the user for the context in which he/she wants to publish or exploit the other functionalities. Please note that in case of product publication it is needed that the user has enough privileges. The list of roles and associated privileges for the catalogue users is reported [https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue#Users.2C_Roles_and_Groups here]. The VRE Manager assignes them.
 +
 
 +
In order to retrieve your security token you can use the [https://wiki.gcube-system.org/gcube/Token_generator token generator] portlet.
 +
 
 +
The right address for contacting the GRSF service in a context can be discovered by means of the Information System <ref name="ic-client"> Information System can be queried via ic-client [https://wiki.gcube-system.org/gcube/Ic-client read more]</ref>. You need the following parameters
 +
 
 +
<source lang="xml">
 +
 
 +
Service Name = GRSFPublisher
 +
Service Class = Data-Catalogue
 +
Entry Name = jersey-servlet
 +
 
 +
</source>
 +
 
 +
For ''testing purpose'', a running instance can be contacted at the following address
 +
 
 +
<source lang="xml">
 +
https://smart-grsf-d-d4s.d4science.org/grsf-publisher-ws/rest/  [GRSF_PUBLISHER_WS_BASE_URL]
 +
</source>
 +
 
 +
The token for testing purpose can be retrieved from the VRE at this url https://next.d4science.org/group/nextnext/home (register yourself if needed).
 +
In the following, every time you perform a request you must specify the type of record for which it will be valid, i.e., in the request path you need to specify a value among:
 +
* grsf;
 +
* fishsource;
 +
* ram;
 +
* firms.
 +
 
 +
Please check the [[#Troubleshooting|Troubleshooting]] section in case of errors on publication phase.
  
 
=== Check Service Availability ===
 
=== Check Service Availability ===
 +
 +
To check that the stock/fishery service is up and running, just put the url below in your browser
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/hello
 +
</source>
 +
 +
Specify the record type by replacing {...}. The response should look like
 +
 +
<source lang="xml">
 +
Hello.. Fishery service is here
 +
</source>
 +
 +
or
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/hello
 +
</source>
 +
 +
and the response should look like
 +
 +
<source lang="xml">
 +
Hello.. Stock service is here
 +
</source>
  
 
=== Retrieve the licenses list ===
 
=== Retrieve the licenses list ===
 +
 +
The default license that will be associated to the products, if not specified, is the [https://creativecommons.org/licenses/by-sa/4.0/legalcode CC-BY-SA-4.0] one. However, if it doesn't feet your needs, you can use one of the others available and retrievable by contacting the service(s) this way
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/get-licenses?gcube-token=YOUR_TOKEN
 +
</source>
 +
 +
or, for stock
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/get-licenses?gcube-token=YOUR_TOKEN
 +
</source>
 +
 +
The response is a JSON object, containing couples <license key, license name>, which looks like
 +
 +
<source lang="text">
 +
{
 +
    "AFL-3.0": "Academic Free License 3.0",
 +
    "RPSL-1.0": "RealNetworks Public Source License 1.0",
 +
    "ODC-BY-1.0": "Open Data Commons Attribution License 1.0",
 +
    "IPL-1.0": "IBM Public License 1.0",
 +
    "ODbL-1.0": "Open Data Commons Open Database License 1.0",
 +
    "PostgreSQL": "PostgreSQL License",
 +
    "W3C": "W3C License",
 +
    ....
 +
}
 +
</source>
 +
 +
During the publication phase, the ''identifier of the license'' chosen should be provided.
  
 
=== Stock Publication Example ===
 
=== Stock Publication Example ===
 +
 +
The publish method to invoke to publish a stock for rams, grsf, fishsource or ram is the following
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/publish-product?gcube-token=YOUR_TOKEN
 +
</source>
 +
 +
The JSON object you must provide in input has the following structure (of course, not all fields are mandatory)
 +
 +
<source lang="xml">
 +
 +
    "description":...,
 +
    "license_id":...,
 +
    "version":...,
 +
    "maintainer":...,
 +
    "maintainer_contact":...,
 +
    "database_sources":[...],
 +
    "source_of_information":[...],
 +
    "uuid_knowledge_base":...,
 +
    "traceability_flag":..,
 +
    "data_owner":...,
 +
    "type":...,
 +
    "stock_name":...,
 +
    "stock_id":...,
 +
    "stock_uri":...,
 +
    "species":[...],
 +
    "assessment_distribution_area":[...],
 +
    "exploiting_fishery":[...],
 +
    "management_entity":...,
 +
    "assessment_methods":...,
 +
    "state_of_marine_resource":...,
 +
    "standard_exploitation_rate":[...],
 +
    "standard_abundance_level":[...],
 +
    "water_area":[...],
 +
    "narrative_state_and_trend":...,
 +
    "scientific_advice":...,
 +
    "reporting_entity":...,
 +
    "reporting_year":...,
 +
    "status":...,
 +
    "short_title":...,
 +
    "refers_to":[...]
 +
}
 +
</source>
 +
 +
The response of the method is a JSON object of this kind
 +
 +
<source lang="xml">
 +
{
 +
  "id": ... , // identifier of the created product in the catalogue
 +
  "knowledge_base_id" : .... // identifier of the product in the knowledge base
 +
  "product_url": ..., // url of the created product
 +
  "error": ... // in case of error, check this field
 +
}
 +
</source>
 +
In case of success the HTTP code is 201 (CREATED) and the response contains the url and the unique identifier assigned to the product.
 +
In case of errors (BAD_REQUEST, INTERNAL_SERVER_ERROR, FORBIDDEN ... ) the "error" message of the above object reports what was wrong.
 +
 +
==== Example ====
 +
 +
A valid JSON, for example, is the following one
 +
 +
/*TODO*/
 +
 +
the response obtained from the service is
 +
 +
/*TODO*/
  
 
=== Fishery Publication Example ===
 
=== Fishery Publication Example ===
  
 +
 +
The publish method to invoke to publish a fishery product is the following
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/publish-product?gcube-token=YOUR_TOKEN
 +
</source>
 +
 +
The JSON object you must provide in input has the following structure (of course, not all fields are mandatory)
 +
 +
<source lang="xml">
 +
{
 +
  "description": ...,
 +
  "license_id": ...,
 +
  "version": ...,
 +
  "maintainer": ...,
 +
  "maintainer_contact": ...,
 +
  "catches_or_landings": [...],
 +
  "database_sources": [...],
 +
  "source_of_information": [...],
 +
  "uuid_knowledge_base" : ...,
 +
  "traceability_flag": ...,
 +
  "short_title": ...,
 +
  "refers_to":[...],
 +
  "data_owner": ...,
 +
  "reporting_year": …,
 +
  "type": ...,
 +
  "fishery_name": ...,
 +
  "fishery_id": ...,
 +
  "scientific_name": ...,
 +
  "fishing_area": [...],
 +
  "exploited_stocks": [...],
 +
  "management_entity": ...,
 +
  "jurisdiction_area": ...,
 +
  "production_system_type": ...,
 +
  "flag_state": ...,
 +
  "fishing_gear": ...,
 +
  "status": ...,
 +
  "environment”: ...
 +
}
 +
</source>
 +
 +
The response of the method is a JSON object of this kind
 +
 +
<source lang="xml">
 +
{
 +
  "id": ... , // identifier of the created product in the catalogue
 +
  "knowledge_base_id" : .... // identifier of the product in the knowledge base
 +
  "product_url": ..., // url of the created product
 +
  "error": ... // in case of error, check this field
 +
}
 +
</source>
 +
In case of success the HTTP code is 201 (CREATED) and the response contains the url and the unique identifier assigned to the product.
 +
In case of errors (BAD_REQUEST, INTERNAL_SERVER_ERROR, FORBIDDEN ... ) the "error" message of the above object reports what was wrong.
 +
 +
==== Example ====
 +
 +
A valid JSON, for example, is the following one
 +
 +
/* TODO */
 +
 +
the response obtained from the service is
 +
 +
/* TODO */
 +
 +
=== Delete a published product ===
 +
If for some reason you need to delete a published product, you can invoke the following delete http methods. For fishery it is
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/delete-product?gcube-token=YOUR_TOKEN
 +
</source>
 +
 +
whereas for stock
 +
 +
<source lang="xml">
 +
[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/delete-product?gcube-token=YOUR_TOKEN
 +
</source>
 +
 +
You must provide the identifier (returned back at creation time) of the product, in a JSON that looks like
 +
 +
<source lang="xml">
 +
 +
{"id": "product-to-delete-identifier"}
 +
 +
</source>
 +
 +
The response status of the service, in case of success is 200 (OK)
  
 
=== How To Publish a GRSF product using JAVA ===
 
=== How To Publish a GRSF product using JAVA ===
Line 362: Line 1,023:
 
import org.apache.commons.httpclient.methods.PostMethod;
 
import org.apache.commons.httpclient.methods.PostMethod;
 
import org.apache.http.HttpStatus;
 
import org.apache.http.HttpStatus;
import org.slf4j.Logger;
+
import org.apache.log4j.Logger;
import org.slf4j.LoggerFactory;
+
  
 
/**
 
/**
  * The Class GRSFPublishMetataTest.
+
  * The Class GRSFPublishMetadata.
 
  *
 
  *
 
  * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
 
  * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
  * Oct 12, 2016
+
  * Oct 13, 2016
 
  */
 
  */
public class GRSFPublishMetataTest {
+
public class GRSFPublishMetadata {
  
public static final Logger logger = LoggerFactory.getLogger(GRSFPublishMetataTest.class);
+
public static final Logger logger = Logger.getLogger(GRSFPublishMetadata.class);
private static final String GRSF_PUBLISHER_REST_SERVICE_URL = "https://pre.d4science.org/grsf-publisher-ws/rest";
+
private static final String GRSF_PUBLISHER_REST_SERVICE_BASE_URL = "https://next.d4science.org/grsf-publisher-ws/rest/";
 +
 
 +
/**
 +
* The Enum PRODUCT_TYPE.
 +
*
 +
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
 +
* Oct 13, 2016
 +
*/
 
private static enum PRODUCT_TYPE{stock, fishery}
 
private static enum PRODUCT_TYPE{stock, fishery}
 
private static final String PUBLISH_PRODUCT_REQUEST = "publish-product";
 
private static final String PUBLISH_PRODUCT_REQUEST = "publish-product";
 
private static final String GCUBE_TOKEN_PARAMETER = "gcube-token";
 
private static final String GCUBE_TOKEN_PARAMETER = "gcube-token";
private static final String GCUBE_TOKEN_VALUE = "XYZ"; //***********SET YOUR TOKEN************
+
private static final String GCUBE_TOKEN_VALUE = [YOUR TOKEN]; //***********SET YOUR TOKEN************
 
private static final String CONTENTTYPE = "application/json";
 
private static final String CONTENTTYPE = "application/json";
 
private HttpClient httpClient = null;
 
private HttpClient httpClient = null;
Line 384: Line 1,051:
  
 
/**
 
/**
* Instantiates a new GRSF publish metata test.
+
* Instantiates a new GRSF publish metadata.
 
*/
 
*/
public GRSFPublishMetataTest() {
+
public GRSFPublishMetadata() {
 
MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
 
MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
 
connectionManager.getParams().setSoTimeout(TIME_OUT_REQUESTS);
 
connectionManager.getParams().setSoTimeout(TIME_OUT_REQUESTS);
Line 392: Line 1,059:
  
 
}
 
}
 
  
 
/**
 
/**
Line 404: Line 1,070:
 
public String publishProduct(PRODUCT_TYPE type, String body) throws Exception {
 
public String publishProduct(PRODUCT_TYPE type, String body) throws Exception {
 
// Create a method instance.
 
// Create a method instance.
String buildURL = GRSF_PUBLISHER_REST_SERVICE_URL + "/" + type.toString() +"/"+PUBLISH_PRODUCT_REQUEST +"?"+GCUBE_TOKEN_PARAMETER +"="+GCUBE_TOKEN_VALUE;
+
String buildURL = GRSF_PUBLISHER_REST_SERVICE_BASE_URL + "/" + type.toString() +"/"+PUBLISH_PRODUCT_REQUEST +"?"+GCUBE_TOKEN_PARAMETER +"="+GCUBE_TOKEN_VALUE;
 
PostMethod method = new PostMethod(buildURL);
 
PostMethod method = new PostMethod(buildURL);
 
method.setRequestHeader("Content-type", CONTENTTYPE);
 
method.setRequestHeader("Content-type", CONTENTTYPE);
Line 443: Line 1,109:
 
public static void main(String[] args) {
 
public static void main(String[] args) {
 
try {
 
try {
GRSFPublishMetataTest grsfP = new GRSFPublishMetataTest();
+
GRSFPublishMetadata grsfP = new GRSFPublishMetadata();
String minimal_json_stock = "YOUR STOCK"; //***********SET YOUR STOCK************
+
String minimal_json_stock =
 +
  "{\"description\":\"This stock product was generated for testing purposes, to show how publication works. Please refer to https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF for more information\"," +
 +
  "\"license_id\":\"CC-BY-SA-4.0\"," +
 +
  "\"version\":1," +
 +
  "\"maintainer\":\"Francesco Mangiacrapa\","+
 +
  "\"maintainer_contact\":\"francesco.mangiacrapa@isti.cnr.it\","+
 +
  "\"catches_or_landings\":\"unknown\","+
 +
  "\"database_sources\":["+
 +
      "{\"name\":\"RAM\",\"url\":\"test url\"}" +
 +
      "]" +
 +
    ",\"source_of_information\":[{\"name\":\"the source of information\",\"url\":\"http://www.google.com\"}" +
 +
    "]," +
 +
  "\"data_owner\":\"IATTC\","+
 +
  "\"type\":\"Assessment Unit\","+
 +
  "\"stock_name\":\"Skipjack tuna - Western Pacific\","+ //YOU MUST CHANGE THE STOCK NAME FOR TESTING
 +
  "\"stock_id\":\"SKJ - EPO - TESTING\","+
 +
  "\"species_scientific_name\":\"SKJ\","+
 +
  "\"assessment_distribution_area\":\"Western Pacific\","+
 +
  "\"exploiting_fishery\":\"Tunas and billfishes fishery\","+
 +
  "\"management_entity\":\"DFO\","+
 +
  "\"assessment_methods\":\"Analytical assessment\","+
 +
  "\"state_of_marine_resource\":null,"+
 +
  "\"exploitation_rate\":\"High fishing mortality\","+
 +
  "\"abundance_level\":\"Intermediate abundance\","+
 +
  "\"narrative_state_and_trend\":\"Stock size and fishing pressure are considered to be close to their value at MSY.\","+
 +
  "\"scientific_advice\":\"The indices of abundance from two longline fleets available for this stock present divergent trends over the last few years, the differences observed in targeting are not fully explained.\","+
 +
  "\"reporting_entity\":\"GRP3\","+
 +
  "\"reporting_year\":2016,"+
 +
  "\"status\":\"pending\"}";
 +
 
 
String response = grsfP.publishProduct(PRODUCT_TYPE.stock, minimal_json_stock);
 
String response = grsfP.publishProduct(PRODUCT_TYPE.stock, minimal_json_stock);
 
logger.info("The Response: "+response);
 
logger.info("The Response: "+response);
Line 454: Line 1,149:
 
}
 
}
 
</pre>
 
</pre>
 +
 +
The response should look like:
 +
 +
<pre>
 +
 +
call post to URI .... https://next.d4science.org/grsf-publisher-ws/rest/stock/publish-product?gcube-token=[YOUR TOKEN]
 +
the body is...{"description":"This stock product was generated for testing purposes, to show how publication works. Please refer to https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF for more information","license_id":"CC-BY-SA-4.0","version":1,"maintainer":"Francesco Mangiacrapa","maintainer_contact":"francesco.mangiacrapa@isti.cnr.it","catches_or_landings":"unknown","database_sources":[{"name":"RAM","url":"test url"}],"source_of_information":[{"name":"the source of information","url":"http://www.google.com"}],"data_owner":"IATTC","type":"Assessment Unit","stock_name":"Skipjack tuna - Western Pacific Ocean 4","stock_id":"SKJ - EPO - TESTING","species_scientific_name":"SKJ","assessment_distribution_area":"Western Pacific Ocean 4","exploiting_fishery":"Tunas and billfishes fishery","management_entity":"DFO","assessment_methods":"Analytical assessment","state_of_marine_resource":null,"exploitation_rate":"High fishing mortality","abundance_level":"Intermediate abundance","narrative_state_and_trend":"Stock size and fishing pressure are considered to be close to their value at MSY.","scientific_advice":"The indices of abundance from two longline fleets available for this stock present divergent trends over the last few years, the differences observed in targeting are not fully explained.","reporting_entity":"GRP3","reporting_year":2016,"status":"pending"}
 +
The Response: {"id":"8426bce9-15b9-4c4a-a526-e829882b91ec","dataset_url":"https://next.d4science.org/group/nextnext/data-catalogue?path=/dataset/skipjack_tuna_-_western_pacific_ocean_4","error":null}
 +
 +
</pre>
 +
 +
You must use the following dependencies (if you are using Maven):
 +
 +
<pre>
 +
<!-- COMMONS HTTP -->
 +
<dependency>
 +
    <groupId>commons-httpclient</groupId>
 +
    <artifactId>commons-httpclient</artifactId>
 +
    <version>3.1</version>
 +
</dependency>
 +
<!-- LOGS -->
 +
<dependency>
 +
  <groupId>log4j</groupId>
 +
  <artifactId>log4j</artifactId>
 +
  <version>1.2.16</version>
 +
</dependency>
 +
</pre>
 +
 +
== GRSF records - manage facility ==
 +
GRSF records will be validated by experts, in order to check that they have been properly generated starting from source (i.e., FIRMS, RAM and FishSource) records. The GRSF Admin VRE is the environment dedicated to this activity. It will offer a manage facility to users having the GRSF Administrator role's rights.
 +
 +
By pushing on the "Manage Item" button when a GRSF record is selected, the manage panel shows up to report a summary of the item and ''currently'' allows to:
 +
 +
* change the current status;
 +
* add an annotation message for the ongoing change.
 +
 +
The updates to the record will be notified to the Knowledge Base of GRSF records before any change is reflected to the catalogue.
 +
 +
==Troubleshooting==
 +
Here are reported solutions to some of the errors may arise while you try to publish items. Generally, the error is specified in the ''message'' field of the returned JSON. In case it is empty but still the ''success'' field is set to false, then you should take in consideration the following:
 +
 +
* '''Tags''': they must have a length within the range [2, 100] characters
 +
== References ==

Latest revision as of 14:21, 8 April 2024

** THIS PAGE IS UNDER CONSTRUCTION **

GCube Data Catalogue: support for GRSF

In this page are reported the relevant information about the GRSF Data Catalogue, which is available here. This page is somehow an extension of the main gCube Data Catalogue guide, you are suggested to read before continue.

The GRFS Data Catalogue stores, as well as allows the publication of products of two types: Stock and Fishery. Apart from the default set of metadata, each type of product will also have specific fields. Some of them will also become automatically tags of the product. The same reasoning applies for group associations. In fact a set of groups was already available and each product will be automatically associated to them during publication, if that is the case. Fields that fire tags creation or groups association are documented below.

The publication phase is performed by means of a RESTful service whose publish methods accept JSON objects. The service allows also to publish records belonging to the original source records (i.e., "RAM", "FishSource" and "FIRMS") on which the aggregated GRSF records are build.

Metadata

Base Metadata

The following table shows the set of core metadata, that is the ones shared by both Stock and Fishery types. Some of them are automatically filled. The values given to some fields are automatically used to tag the product. Check the 'Is Tag' column of the table below. Other fields have a controlled vocabulary (that is, they can assume values selected from a defined set), and the value assigned to these fields allow to automatically determine to which group assign the product. Check the 'Is Group' column below.

The table also reports the column Type that shows how the field is mapped into the product, once it is published within the catalogue, i.e. as a simple field (key/value pair, possibly repeatable) or a resource (an object with a mandatory name, an optional description and a mandatory url).

IMPORTANT: Any other field that doesn't match one of the below ones will be managed as an object having a key and a value, both of String type, and attached to the product as a simple field.

Name Api Name (JSON) Display Section Is Tag Is Group Is Sensitive Example Guidelines/Comments
Title stock_name

fishery_name

traceability_unit_name

Top of the record No No No
Description N/A Top of the record No No No It is generated with this template:
Short Name: ${short_name}
GRSF Semantic Identifier: ${grsf_semantic_identifier}
Record URL: ${record_url}
License license_id Right panel No No No CC-BY-SA-4.0
Author N/A Management Info No No No Joe Blogg This field is automatically compiled by using

the information of the caller.

Author contact N/A Management Info No No No joe.blogg@example.com This field is automatically compiled by using

the information of the caller.

Version version Management Info No No No 1.0
Maintainer N/A Management Info No No No Joe Blogg This field is automatically compiled by using

the information of the caller.

Maintainer Contact N/A Management Info No No No joe.blogg@example.com This field is automatically compiled by using

the information of the caller.

Common Metadata

Besides the above common metadata, the following attributes are captured for stock, fisheries, and traceability unit records.

Name Api Name (JSON) Display Section Is Tag Is Group Is Sensitive Type Example Guidelines/Comments
N/A source N/A No Yes
if(source == 'GRSF')
  'grsf-group'
else 
  legacy-group'
No N/A "source" : "grsf". Valid values are: firms, fishsource, grsf, ram, sdg. When the value is grsf the system type of the record is defined by grsf_type property. Otherwise, the system type is Legacy.
GRSF Type grsf_type Stock/Fishery/Traceability Unit Identity Yes No No Field It is also used as system type when the source is grsf
Short Name short_name Stock/Fishery/Traceability Unit Identity No No No Field
GRSF Semantic Identifier grsf_semantic_identifier Stock/Fishery/Traceability Unit Identity + Top of the record No No No Field
Database Source database_sources Stock/Fishery/Traceability Unit Identity No Yes only for GRSF records No Field (repeatable) "database_sources": [ "FishSource", "Fisheries and Resources Monitoring System (FIRMS)", "RAM Legacy Stock Assessment Database", "FAO SDG 14.4.1 Questionnaire" ]
Species species Stock/Fishery/Traceability Unit Identity Yes No No Field (repeatable)
Domain N/A Record Info No Yes (Stock or Fishery). No Field
GRSF UUID grsf_uuid Record Info No No No Field
Citation citation Record Info + Top Button No No No Field
Annotation annotations Record Info No No Yes Field (repeatable)
Record URL N/A Record Info No No No Field Added by the GRSF Publisher service

Stock and Fishery Common Metadata

Name Api Name (JSON) Display Section Is Tag Is Group Is Sensitive Type Example Guidelines/Comments
Similar GRSF Record similar_grsf_records Stock/Fishery Identity No No No Field (repeatable)
Connected Stock Record / Connected Fishery Record connected Stock/Fishery Identity No No No Field (repeatable)
Data Owner data_owner Stock/Fishery Data No No Yes Field (repeatable)
Catch catches Stock/Fishery Data No Yes (Catch) Yes TimeSeries
Landing landings Stock/Fishery Data No Yes (Landing) Yes TimeSeries
SDG Flag sdg_flag Record Info No Yes (only if the value is true) No Field
Status of the Record status_grsf_record Record Info No No No Field
spatial spatial Record Info No No No Field Due to plugin constraints, the key must be spatial. The portlet visualizes it as "Geospatial"
N/A source_of_information Data and Resources No No No Resource
N/A refers_to Data and Resources No No No Resource
N/A connections_indicator N/A Yes (connected, not connected) No No N/A
N/A similarities_indicator N/A Yes ("with similar records", "without similar records") No No N/A

Stock Metadata

The Stock record type also supports the following list of fields.

Name Api Name (JSON) Display Section Is Tag Is Group Is Sensitive Type Example Guidelines/Comments
GRSF Stock Name stock_name Stock Identity + Top of the record No No No Field
Assessment Area assessment_area Stock Identity Yes No No Field (repeatable)
Intersecting FAO Major Fishing Areas hidden_assessment_area Stock Identity Yes No Yes Field (repeatable)
Assessment Method assessment_methods Stock Data No Yes (Group name: "Assessment Method") Yes TimeSeries
Abundance Level (FIRMS Standard) firms_standard_abundance_level Stock Data No Yes (Group name: "Abundance Level (FIRMS Standard)") Yes TimeSeries
Abundance Level abundance_level Stock Data No Yes (Group name: "Abundance Level") Yes TimeSeries
Biomass biomass Stock Data No Yes (Group name: "Biomass") Yes TimeSeries
Fishing Pressure (FIRMS Standard) firms_standard_fishing_pressure Stock Data No Yes (Group name: "Fishing Pressure (FIRMS Standard)") Yes TimeSeries
Fishing Pressure fishing_pressure Stock Data No Yes (Group name: "Fishing Pressure") Yes TimeSeries
State and Trend state_and_trend_of_marine_resources Stock Data No Yes (Group name: "State and Trend") Yes TimeSeries
FAO Stock Status Category fao_categories Stock Data No Yes (Group name: "FAO Stock Status Category") Yes TimeSeries
Scientific Advice scientific_advice Stock Data No Yes (Group name: "Scientific Advice") Yes TimeSeries
Assessor assessor Stock Data No No Yes Field

Fishery Metadata

The Fishery record type also supports the following list of fields.

Name Api Name (JSON) Display Section Is Tag Is Group Is Sensitive Type Example Guidelines/Comments
GRSF Fishery Name fishery_name Fishery Identity + Top of the record No No No Field
Traceability Flag traceability_flag Fishery Identity No Yes (only if the value is true) No Field
Fishing Area fishing_area Fishery Identity Yes No No Field (repeatable)
Intersecting FAO Major Fishing Areas hidden_fishing_area Fishery Identity Yes No Yes Field (repeatable)
Jurisdiction Area jurisdiction_area Fishery Identity Yes No No Field (repeatable)
Flag State flag_state Fishery Identity Yes No No Field (repeatable)
Fishing Gear fishing_gear Fishery Identity Yes No No Field (repeatable)
Management Body/Authority management_body_authorities Fishery Identity No No No Field (repeatable)
Resources Exploited resources_exploited Fishery Identity No No No Field (repeatable)


Traceability Unit Metadata

The Traceability Unit record type also supports the following list of fields.

Name Api Name (JSON) Display Section Is Tag Is Group Is Sensitive Type Example Guidelines/Comments
GRSF Traceability Unit Name traceability_unit_name Traceability Unit Identity + Top of the record No No No Field Scomber scombrus - 27.3 - European Commission - Lithuania - Midwater trawls The semantic title of the record.
Assessment Area assessment_area Traceability Unit Identity Yes No No Field (repeatable) Code: 27.5.b, System: fao, Name: Faroes Grounds (Division 27.5.b) The assessment areas of the record.
Management/Reporting Area management_reporting_area Traceability Unit Identity Yes No No Field (repeatable) Code: 27.5.b, System: fao, Name: Faroes Grounds (Division 27.5.b) The management reporting areas of the record.
Flag State flag_state Traceability Unit Identity Yes No No Field (repeatable) Code: LTU, System: iso3, Name: Lithuania The flag state of the record.
Fishing Gear fishing_gear Traceability Unit Identity Yes No No Field (repeatable) Code: 03.29, System: isscfg, Name: Midwater trawls The fishing gear of the record.
Management Body/Authority management_body_authorities Traceability Unit Identity No No No Field (repeatable) Code: authority:INT:EC, System: grsf-org, Name: European Commission The management authority of the record.
Connected Stock Record referring_stock_record Traceability Unit Identity No No No Field https://data.d4science.org/ctlg/GRSF_Admin/9b36373a-ea6d-336a-8e0d-567555080aa4 The connected GRSF stock record.
Stock Record referring_stock_record Data and Resources No No No Resource https://data.d4science.org/ctlg/GRSF_Admin/9b36373a-ea6d-336a-8e0d-567555080aa4 The connected GRSF stock record.
Connected Fishery Record referring_fishery_record Traceability Unit Identity No No No Field https://data.d4science.org/ctlg/GRSF_Admin/0f440877-7f8c-4f05-b74d-8ec3469075bd The connected GRSF fishery record.
Connected Fishery Record referring_fishery_record Data and Resources No No No Resource https://data.d4science.org/ctlg/GRSF_Admin/0f440877-7f8c-4f05-b74d-8ec3469075bd The connected GRSF fishery record.
Traceability Unit URI traceability_record_uri Data and Resources No No No Resource https://github.com/grsf/resource/traceability_unit/b0423ecd-311c-33c4-ab6d-62cfb6f2806b The unique URI of the Traceability Unit based on the GRSF UUID standard.

GRSF Publication Web Service

This guide is related to DEPRECATED grsf-publisher-ws service.

Records publication is performed by means of a RESTful web service running over SmartGears. Almost every call to the service requires the security token of the user for the context in which he/she wants to publish or exploit the other functionalities. Please note that in case of product publication it is needed that the user has enough privileges. The list of roles and associated privileges for the catalogue users is reported here. The VRE Manager assignes them.

In order to retrieve your security token you can use the token generator portlet.

The right address for contacting the GRSF service in a context can be discovered by means of the Information System [1]. You need the following parameters

Service Name = GRSFPublisher
Service Class = Data-Catalogue
Entry Name = jersey-servlet

For testing purpose, a running instance can be contacted at the following address

https://smart-grsf-d-d4s.d4science.org/grsf-publisher-ws/rest/  [GRSF_PUBLISHER_WS_BASE_URL]

The token for testing purpose can be retrieved from the VRE at this url https://next.d4science.org/group/nextnext/home (register yourself if needed). In the following, every time you perform a request you must specify the type of record for which it will be valid, i.e., in the request path you need to specify a value among:

  • grsf;
  • fishsource;
  • ram;
  • firms.

Please check the Troubleshooting section in case of errors on publication phase.

Check Service Availability

To check that the stock/fishery service is up and running, just put the url below in your browser

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/hello

Specify the record type by replacing {...}. The response should look like

Hello.. Fishery service is here

or

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/hello

and the response should look like

Hello.. Stock service is here

Retrieve the licenses list

The default license that will be associated to the products, if not specified, is the CC-BY-SA-4.0 one. However, if it doesn't feet your needs, you can use one of the others available and retrievable by contacting the service(s) this way

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/get-licenses?gcube-token=YOUR_TOKEN

or, for stock

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/get-licenses?gcube-token=YOUR_TOKEN

The response is a JSON object, containing couples <license key, license name>, which looks like

{
    "AFL-3.0": "Academic Free License 3.0",
    "RPSL-1.0": "RealNetworks Public Source License 1.0",
    "ODC-BY-1.0": "Open Data Commons Attribution License 1.0",
    "IPL-1.0": "IBM Public License 1.0",
    "ODbL-1.0": "Open Data Commons Open Database License 1.0",
    "PostgreSQL": "PostgreSQL License",
    "W3C": "W3C License",
    ....
}

During the publication phase, the identifier of the license chosen should be provided.

Stock Publication Example

The publish method to invoke to publish a stock for rams, grsf, fishsource or ram is the following

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/publish-product?gcube-token=YOUR_TOKEN

The JSON object you must provide in input has the following structure (of course, not all fields are mandatory)

{  
    "description":...,
    "license_id":...,
    "version":...,
    "maintainer":...,
    "maintainer_contact":...,
    "database_sources":[...],
    "source_of_information":[...],
    "uuid_knowledge_base":...,
    "traceability_flag":..,
    "data_owner":...,
    "type":...,
    "stock_name":...,
    "stock_id":...,
    "stock_uri":...,
    "species":[...],
    "assessment_distribution_area":[...],
    "exploiting_fishery":[...],
    "management_entity":...,
    "assessment_methods":...,
    "state_of_marine_resource":...,
    "standard_exploitation_rate":[...],
    "standard_abundance_level":[...],
    "water_area":[...],
    "narrative_state_and_trend":...,
    "scientific_advice":...,
    "reporting_entity":...,
    "reporting_year":...,
    "status":...,
    "short_title":...,
    "refers_to":[...]
}

The response of the method is a JSON object of this kind

{
   "id": ... , // identifier of the created product in the catalogue
   "knowledge_base_id" : .... // identifier of the product in the knowledge base
   "product_url": ..., // url of the created product
   "error": ... // in case of error, check this field
}

In case of success the HTTP code is 201 (CREATED) and the response contains the url and the unique identifier assigned to the product. In case of errors (BAD_REQUEST, INTERNAL_SERVER_ERROR, FORBIDDEN ... ) the "error" message of the above object reports what was wrong.

Example

A valid JSON, for example, is the following one

/*TODO*/

the response obtained from the service is

/*TODO*/

Fishery Publication Example

The publish method to invoke to publish a fishery product is the following

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/publish-product?gcube-token=YOUR_TOKEN

The JSON object you must provide in input has the following structure (of course, not all fields are mandatory)

{
   "description": ...,
   "license_id": ...,
   "version": ...,
   "maintainer": ...,
   "maintainer_contact": ...,
   "catches_or_landings": [...],
   "database_sources": [...],
   "source_of_information": [...],
   "uuid_knowledge_base" : ...,
   "traceability_flag": ...,
   "short_title": ...,
   "refers_to":[...],
   "data_owner": ...,
   "reporting_year": …,
   "type": ...,
   "fishery_name": ...,
   "fishery_id": ...,
   "scientific_name": ...,
   "fishing_area": [...],
   "exploited_stocks": [...],
   "management_entity": ...,
   "jurisdiction_area": ...,
   "production_system_type": ...,
   "flag_state": ...,
   "fishing_gear": ...,
   "status": ...,
   "environment”: ...
}

The response of the method is a JSON object of this kind

{
   "id": ... , // identifier of the created product in the catalogue
   "knowledge_base_id" : .... // identifier of the product in the knowledge base
   "product_url": ..., // url of the created product
   "error": ... // in case of error, check this field
}

In case of success the HTTP code is 201 (CREATED) and the response contains the url and the unique identifier assigned to the product. In case of errors (BAD_REQUEST, INTERNAL_SERVER_ERROR, FORBIDDEN ... ) the "error" message of the above object reports what was wrong.

Example

A valid JSON, for example, is the following one

/* TODO */

the response obtained from the service is

/* TODO */

Delete a published product

If for some reason you need to delete a published product, you can invoke the following delete http methods. For fishery it is

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/fishery/delete-product?gcube-token=YOUR_TOKEN

whereas for stock

[GRSF_PUBLISHER_WS_BASE_URL]/{...}/stock/delete-product?gcube-token=YOUR_TOKEN

You must provide the identifier (returned back at creation time) of the product, in a JSON that looks like

{"id": "product-to-delete-identifier"}

The response status of the service, in case of success is 200 (OK)

How To Publish a GRSF product using JAVA

Below you find a simple Java application publishing a GRSF product (i.e. a stock).

package [YOUR PACKAGE];

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.http.HttpStatus;
import org.apache.log4j.Logger;

/**
 * The Class GRSFPublishMetadata.
 *
 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
 * Oct 13, 2016
 */
public class GRSFPublishMetadata {

	public static final Logger logger = Logger.getLogger(GRSFPublishMetadata.class);
	private static final String GRSF_PUBLISHER_REST_SERVICE_BASE_URL = "https://next.d4science.org/grsf-publisher-ws/rest/";

	/**
	 * The Enum PRODUCT_TYPE.
	 *
	 * @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
	 * Oct 13, 2016
	 */
	private static enum PRODUCT_TYPE{stock, fishery}
	private static final String PUBLISH_PRODUCT_REQUEST = "publish-product";
	private static final String GCUBE_TOKEN_PARAMETER = "gcube-token";
	private static final String GCUBE_TOKEN_VALUE = [YOUR TOKEN]; //***********SET YOUR TOKEN************
	private static final String CONTENTTYPE = "application/json";
	private HttpClient httpClient = null;
	public static final int TIME_OUT_REQUESTS = 5000; //5 sec

	/**
	 * Instantiates a new GRSF publish metadata.
	 */
	public GRSFPublishMetadata() {
		MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
		connectionManager.getParams().setSoTimeout(TIME_OUT_REQUESTS);
		this.httpClient = new HttpClient(connectionManager);

	}

	/**
	 * Publish product.
	 *
	 * @param type the type
	 * @param body the body
	 * @return the string
	 * @throws Exception the exception
	 */
	public String publishProduct(PRODUCT_TYPE type, String body) throws Exception {
		// Create a method instance.
		String buildURL = GRSF_PUBLISHER_REST_SERVICE_BASE_URL + "/" + type.toString() +"/"+PUBLISH_PRODUCT_REQUEST +"?"+GCUBE_TOKEN_PARAMETER +"="+GCUBE_TOKEN_VALUE;
		PostMethod method = new PostMethod(buildURL);
		method.setRequestHeader("Content-type", CONTENTTYPE);
		logger.debug("call post to URI .... " + method.getURI());
		logger.debug("	the body is..." + body);
		method.setRequestEntity(new ByteArrayRequestEntity(body.getBytes()));
		byte[] responseBody = null;
		try {
			// Execute the method.
			int statusCode = httpClient.executeMethod(method);

			if (statusCode != HttpStatus.SC_OK && statusCode != HttpStatus.SC_CREATED) {
				logger.error("Method failed: " + method.getStatusLine()+"; Response bpdy: "+method.getResponseBody());
				method.releaseConnection();
				throw new Exception("Method failed: " + method.getStatusLine()+"; Response body: "+new String(method.getResponseBody()));
			}
			// Read the response body.
			responseBody = method.getResponseBody();

		} catch (HttpException e) {
			logger.error("Fatal protocol violation: ", e);
			method.releaseConnection();
			throw new Exception("Fatal protocol violation: " + e.getMessage());
		} catch (Exception e) {
			logger.error("Fatal transport error: ", e);
			method.releaseConnection();
			throw new Exception("Fatal transport error: " + e.getMessage());
		}
		method.releaseConnection();
		return new String(responseBody);
	}

	/**
	 * The main method.
	 *
	 * @param args the arguments
	 */
	public static void main(String[] args) {
		try {
		GRSFPublishMetadata grsfP = new GRSFPublishMetadata();
			String minimal_json_stock =
			   "{\"description\":\"This stock product was generated for testing purposes, to show how publication works. Please refer to https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF for more information\"," +
			   "\"license_id\":\"CC-BY-SA-4.0\"," +
			   "\"version\":1," +
			   "\"maintainer\":\"Francesco Mangiacrapa\","+
			   "\"maintainer_contact\":\"francesco.mangiacrapa@isti.cnr.it\","+
			   "\"catches_or_landings\":\"unknown\","+
			   "\"database_sources\":["+
			      "{\"name\":\"RAM\",\"url\":\"test url\"}" +
			      "]" +
			    ",\"source_of_information\":[{\"name\":\"the source of information\",\"url\":\"http://www.google.com\"}" +
			    "]," +
			   "\"data_owner\":\"IATTC\","+
			   "\"type\":\"Assessment Unit\","+
			   "\"stock_name\":\"Skipjack tuna - Western Pacific\","+ //YOU MUST CHANGE THE STOCK NAME FOR TESTING
			   "\"stock_id\":\"SKJ - EPO - TESTING\","+
			   "\"species_scientific_name\":\"SKJ\","+
			   "\"assessment_distribution_area\":\"Western Pacific\","+
			   "\"exploiting_fishery\":\"Tunas and billfishes fishery\","+
			   "\"management_entity\":\"DFO\","+
			   "\"assessment_methods\":\"Analytical assessment\","+
			   "\"state_of_marine_resource\":null,"+
			   "\"exploitation_rate\":\"High fishing mortality\","+
			   "\"abundance_level\":\"Intermediate abundance\","+
			   "\"narrative_state_and_trend\":\"Stock size and fishing pressure are considered to be close to their value at MSY.\","+
			   "\"scientific_advice\":\"The indices of abundance from two longline fleets available for this stock present divergent trends over the last few years, the differences observed in targeting are not fully explained.\","+
			   "\"reporting_entity\":\"GRP3\","+
			   "\"reporting_year\":2016,"+
			   "\"status\":\"pending\"}";

			String response = grsfP.publishProduct(PRODUCT_TYPE.stock, minimal_json_stock);
			logger.info("The Response: "+response);
		}catch (Exception e) {
			e.printStackTrace();
		}
	}

}

The response should look like:


call post to URI .... https://next.d4science.org/grsf-publisher-ws/rest/stock/publish-product?gcube-token=[YOUR TOKEN]
the body is...{"description":"This stock product was generated for testing purposes, to show how publication works. Please refer to https://wiki.gcube-system.org/gcube/GCube_Data_Catalogue_for_GRSF for more information","license_id":"CC-BY-SA-4.0","version":1,"maintainer":"Francesco Mangiacrapa","maintainer_contact":"francesco.mangiacrapa@isti.cnr.it","catches_or_landings":"unknown","database_sources":[{"name":"RAM","url":"test url"}],"source_of_information":[{"name":"the source of information","url":"http://www.google.com"}],"data_owner":"IATTC","type":"Assessment Unit","stock_name":"Skipjack tuna - Western Pacific Ocean 4","stock_id":"SKJ - EPO - TESTING","species_scientific_name":"SKJ","assessment_distribution_area":"Western Pacific Ocean 4","exploiting_fishery":"Tunas and billfishes fishery","management_entity":"DFO","assessment_methods":"Analytical assessment","state_of_marine_resource":null,"exploitation_rate":"High fishing mortality","abundance_level":"Intermediate abundance","narrative_state_and_trend":"Stock size and fishing pressure are considered to be close to their value at MSY.","scientific_advice":"The indices of abundance from two longline fleets available for this stock present divergent trends over the last few years, the differences observed in targeting are not fully explained.","reporting_entity":"GRP3","reporting_year":2016,"status":"pending"}
The Response: {"id":"8426bce9-15b9-4c4a-a526-e829882b91ec","dataset_url":"https://next.d4science.org/group/nextnext/data-catalogue?path=/dataset/skipjack_tuna_-_western_pacific_ocean_4","error":null}

You must use the following dependencies (if you are using Maven):

<!-- COMMONS HTTP -->
<dependency>
    <groupId>commons-httpclient</groupId>
    <artifactId>commons-httpclient</artifactId>
    <version>3.1</version>
</dependency>
<!-- LOGS -->
<dependency>
  <groupId>log4j</groupId>
  <artifactId>log4j</artifactId>
  <version>1.2.16</version>
</dependency>

GRSF records - manage facility

GRSF records will be validated by experts, in order to check that they have been properly generated starting from source (i.e., FIRMS, RAM and FishSource) records. The GRSF Admin VRE is the environment dedicated to this activity. It will offer a manage facility to users having the GRSF Administrator role's rights.

By pushing on the "Manage Item" button when a GRSF record is selected, the manage panel shows up to report a summary of the item and currently allows to:

  • change the current status;
  • add an annotation message for the ongoing change.

The updates to the record will be notified to the Knowledge Base of GRSF records before any change is reflected to the catalogue.

Troubleshooting

Here are reported solutions to some of the errors may arise while you try to publish items. Generally, the error is specified in the message field of the returned JSON. In case it is empty but still the success field is set to false, then you should take in consideration the following:

  • Tags: they must have a length within the range [2, 100] characters

References

  1. Information System can be queried via ic-client read more