Improved service to comply with requests
This commit is contained in:
parent
9502498002
commit
f9f6fbc98e
|
@ -2,6 +2,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|||
|
||||
# Changelog for gCube Global Record of Stocks and Fisheries (GRSF) Publisher
|
||||
|
||||
## [v1.1.0-SNAPSHOT]
|
||||
|
||||
- Accepted input has been changed see #25008
|
||||
|
||||
|
||||
## [v1.0.0]
|
||||
|
||||
- First Version
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
|||
<groupId>org.gcube.data-catalogue</groupId>
|
||||
<artifactId>grsf-publisher</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0.0</version>
|
||||
<version>1.1.0-SNAPSHOT/version>
|
||||
<name>gCube Global Record of Stocks and Fisheries (GRSF) Publisher</name>
|
||||
<description>gCube GRSF publisher uses gCat to deal with GRSF catalogue</description>
|
||||
|
||||
|
|
|
@ -17,15 +17,11 @@
|
|||
<@metadata key="GRSF Type" namespace=identity_namespace var=grsf_type?capitalize />
|
||||
<@metadata key="Short Name" namespace=identity_namespace var=short_name />
|
||||
<#if database_sources??>
|
||||
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources?map(database_source -> database_source.name) />
|
||||
<#-- database_sources will change from list of objects to list of string. Use the line below in place of the line above-->
|
||||
<#-- <@metadatalist key="Database Source" namespace=identity_namespace list=database_sources /> -->
|
||||
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
|
||||
<#if include_sensitive>
|
||||
<#-- We are in Administrative VRE e.g. GRSF_Admin -->
|
||||
<#list database_sources as database_source>
|
||||
<#assign group_list += [{"name":"${database_source.name?lower_case?json_string}-group", "title":"${database_source_id_to_name[database_source.name?lower_case]?json_string}"}] >
|
||||
<#-- database_sources will change from list of objects to list of string. Use the line below in place of the line above-->
|
||||
<#-- <#assign group_list += [{"name":"${database_source_name_to_id[database_source?json_string]}-group", "title":"${database_source?json_string]}"}] > -->
|
||||
<#assign group_list += [{"name":"${database_source_name_to_id[database_source?json_string]}-group", "title":"${database_source?json_string}"}] >
|
||||
</#list>
|
||||
</#if>
|
||||
</#if>
|
||||
|
@ -63,6 +59,7 @@
|
|||
</#if>
|
||||
</#if>
|
||||
<@metadatalist key="Fishing Area" namespace=identity_namespace list=fishing_area tagValues=true />
|
||||
<@metadatalist key="Intersecting FAO Major Fishing Areas" namespace=identity_namespace list=hidden_fishing_area tagValues=true include=include_sensitive />
|
||||
<@metadatalist key="Jurisdiction Area" namespace=identity_namespace list=jurisdiction_area tagValues=true />
|
||||
<@metadatalist key="Flag State" namespace=identity_namespace list=flag_state tagValues=true />
|
||||
<@metadatalist key="Fishing Gear" namespace=identity_namespace list=fishing_gear tagValues=true />
|
||||
|
@ -86,8 +83,7 @@
|
|||
"title": "${group.title}"
|
||||
},
|
||||
</#list>
|
||||
<@group name="assessment-method-group" title="Assessment Method" var=assessment_methods />
|
||||
<@group name="scientific-advice-group" title="Scientific Advice" var=scientific_advice />
|
||||
<#-- <@groupFromRefersTo var=refers_to /> -->
|
||||
<@group name="fishery-group" title="Fishery" var="OK" sep=""/>
|
||||
],
|
||||
"tags": [
|
||||
|
@ -100,32 +96,7 @@
|
|||
],
|
||||
"resources": [
|
||||
<@resources var=source_of_information /><#if refers_to?? && source_of_information??>,</#if>
|
||||
<@resources var=refers_to name="id" />
|
||||
<#--
|
||||
"refers_to": [
|
||||
{
|
||||
"id": "eb7ddeb0-ecc3-393b-b98a-fdb90be2c706",
|
||||
"url": "https://data.d4science.org/ctlg/GRSF_Admin/eb7ddeb0-ecc3-393b-b98a-fdb90be2c706"
|
||||
}
|
||||
]
|
||||
|
||||
It generate the Resource with name FishSource which point to https://data.d4science.org/ctlg/GRSF_Admin/eb7ddeb0-ecc3-393b-b98a-fdb90be2c706
|
||||
|
||||
https://data.d4science.org/ctlg/GRSF_Admin/00a1f849-1b43-3fd1-9255-1d1134c969bb
|
||||
|
||||
According to ticket https://support.d4science.org/issues/24816 this field will be modified as following
|
||||
|
||||
"refers_to": [
|
||||
{
|
||||
"name": "FishSource",
|
||||
"url": "https://data.d4science.org/ctlg/GRSF_Admin/eb7ddeb0-ecc3-393b-b98a-fdb90be2c706"
|
||||
}
|
||||
]
|
||||
|
||||
When changed use the following macro in place of the one using id
|
||||
which is also wrong but it avoid code on server side for the moment
|
||||
<@resources var=refers_to />
|
||||
-->
|
||||
],
|
||||
"timeseries": [
|
||||
<#list timeseries_list as elem>
|
||||
|
|
|
@ -18,9 +18,7 @@
|
|||
|
||||
<@metadata key="Short Name" namespace=identity_namespace var=short_name />
|
||||
<#if database_sources??>
|
||||
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources?map(database_source -> database_source.name) />
|
||||
<#-- database_sources will change from list of objects to list of string. Use the line below in place of the line above-->
|
||||
<#-- <@metadatalist key="Database Source" namespace=identity_namespace list=database_sources /> -->
|
||||
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
|
||||
</#if>
|
||||
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true/>
|
||||
<@metadatalist key="Similar GRSF Record" namespace=identity_namespace list=similar_grsf_record />
|
||||
|
@ -50,19 +48,8 @@
|
|||
<@metadata key="GRSF Stock Name" namespace=identity_namespace var=stock_name />
|
||||
<@metadata key="GRSF Semantic Identifier" namespace=identity_namespace var=grsf_semantic_identifier />
|
||||
<@metadatalist key="Assessment Area" namespace=identity_namespace list=assessment_area tagValues=true />
|
||||
<@metadatalist key="Assessment Method" namespace=data_namespace list=assessment_methods include=include_sensitive />
|
||||
<#--
|
||||
assessment_methods will change from list of string to timeseries.
|
||||
|
||||
Add the following in the configuration
|
||||
{
|
||||
"property": "assessment_methods",
|
||||
"filename": "Assessment Method"
|
||||
},
|
||||
|
||||
Use the line below in place of the line above
|
||||
-->
|
||||
<#-- <@timeseries key="Assessment Method" namespace=data_namespace timeseries="assessment_methods" groupname="assessment-method-group" /> -->
|
||||
<@metadatalist key="Intersecting FAO Major Fishing Areas" namespace=identity_namespace list=hidden_assessment_area tagValues=true include=include_sensitive />
|
||||
<@timeseries key="Assessment Method" namespace=data_namespace timeseries="assessment_methods" groupname="assessment-method-group" />
|
||||
<@timeseries key="Abundance Level (FIRMS Standard)" namespace=data_namespace timeseries="firms_standard_abundance_level" groupname="abundance-level-firms-standard-group" />
|
||||
<@timeseries key="Abundance Level" namespace=data_namespace timeseries="abundance_level" groupname="abundance-level-group" />
|
||||
<@timeseries key="Biomass" namespace=data_namespace timeseries="biomass" groupname="biomass-group" />
|
||||
|
@ -70,13 +57,7 @@
|
|||
<@timeseries key="Fishing Pressure" namespace=data_namespace timeseries="fishing_pressure" groupname="fishing-pressure-group" />
|
||||
<@timeseries key="State and Trend" namespace=data_namespace timeseries="state_and_trend_of_marine_resources" groupname="state-and-trend-group" />
|
||||
<@timeseries key="FAO Stock Status Category" namespace=data_namespace timeseries="fao_categories" groupname="fao-stock-status-category-group" />
|
||||
<@metadatalist key="Scientific Advice" namespace=data_namespace list=scientific_advice include=include_sensitive />
|
||||
<#--
|
||||
scientific_advice will change from list of string to timeseries.
|
||||
|
||||
Use the line below in place of the line above
|
||||
<@timeseries key="Scientific Advice" namespace=data_namespace timeseries="scientific_advice" groupname="scientific-advice-group" />
|
||||
-->
|
||||
<@metadata key="Assessor" namespace=data_namespace var=assessor include=include_sensitive />
|
||||
<#-- END of Stock Metadata -->
|
||||
|
||||
|
@ -111,32 +92,7 @@
|
|||
],
|
||||
"resources": [
|
||||
<@resources var=source_of_information /><#if refers_to?? && source_of_information??>,</#if>
|
||||
<@resources var=refers_to name="id" />
|
||||
<#--
|
||||
"refers_to": [
|
||||
{
|
||||
"id": "eb7ddeb0-ecc3-393b-b98a-fdb90be2c706",
|
||||
"url": "https://data.d4science.org/ctlg/GRSF_Admin/eb7ddeb0-ecc3-393b-b98a-fdb90be2c706"
|
||||
}
|
||||
]
|
||||
|
||||
It generate the Resource with name FishSource which point to https://data.d4science.org/ctlg/GRSF_Admin/eb7ddeb0-ecc3-393b-b98a-fdb90be2c706
|
||||
|
||||
https://data.d4science.org/ctlg/GRSF_Admin/00a1f849-1b43-3fd1-9255-1d1134c969bb
|
||||
|
||||
According to ticket https://support.d4science.org/issues/24816 this field will be modified as following
|
||||
|
||||
"refers_to": [
|
||||
{
|
||||
"name": "FishSource",
|
||||
"url": "https://data.d4science.org/ctlg/GRSF_Admin/eb7ddeb0-ecc3-393b-b98a-fdb90be2c706"
|
||||
}
|
||||
]
|
||||
|
||||
When changed use the following macro in place of the one using id
|
||||
which is also wrong but it avoid code on server side for the moment
|
||||
<@resources var=refers_to />
|
||||
-->
|
||||
],
|
||||
"timeseries": [
|
||||
<#list timeseries_list as elem>
|
||||
|
|
|
@ -70,15 +70,17 @@
|
|||
</#macro>
|
||||
|
||||
<#macro metadatalist key namespace="" list="" tagValues=false include=true sep=",">
|
||||
<#if list?has_content && include>
|
||||
<#if list?has_content>
|
||||
<#list list as elem>
|
||||
<#if tagValues>
|
||||
<#assign tag_list += ["${elem?json_string}"]>
|
||||
</#if>
|
||||
<#if include>
|
||||
{
|
||||
"key": "<#if namespace?has_content>${namespace}:</#if>${key}",
|
||||
"value": "${elem?json_string}"
|
||||
}${sep}
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#macro>
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
.d4science_intro {
|
||||
top: 0;
|
||||
z-index: 2000;
|
||||
position: fixed;
|
||||
display: block ruby;
|
||||
padding: 10px;
|
||||
background: white;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.navbar-fixed-top {
|
||||
top: 100px !important;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
top: 160px !important;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
margin-bottom: 40px !important;
|
||||
}
|
||||
|
||||
.main {
|
||||
top: 90px;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE xml>
|
||||
<web-app>
|
||||
<servlet>
|
||||
<servlet-name>org.gcube.grsf.publisher.ResourceInitializer</servlet-name>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>default</servlet-name>
|
||||
<url-pattern>/docs/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>default</servlet-name>
|
||||
<url-pattern>/api-docs/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet-mapping>
|
||||
<servlet-name>org.gcube.grsf.publisher.ResourceInitializer</servlet-name>
|
||||
<url-pattern>/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
</web-app>
|
Loading…
Reference in New Issue