Fixing templates

This commit is contained in:
Luca Frosini 2024-04-05 15:25:56 +02:00
parent 66ada6ec7a
commit 32fab1ba37
4 changed files with 65 additions and 59 deletions

View File

@ -15,8 +15,14 @@
"version" : "${version?string["0.0"]}",
"extras": [
<#-- START of Common Metadata -->
<#if source = "grsf">
<@metadata key="system:type" var=grsf_type?capitalize sep="" />
<#else>
<@metadata key="system:type" var="Legacy" sep="" />
</#if>
<@metadata key="GRSF Type" namespace=identity_namespace var=grsf_type?capitalize />
<@metadata key="Short Name" namespace=identity_namespace var=short_name />
<@metadata key="GRSF Semantic Identifier" namespace=identity_namespace var=grsf_semantic_identifier />
<#if database_sources??>
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
<#if source = "grsf">
@ -25,10 +31,17 @@
</#list>
</#if>
</#if>
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true/>
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true />
<@metadata key="Domain" var="Fishery" />
<@metadata key="GRSF UUID" var=grsf_uuid />
<@metadata key="Citation" var=citation />
<@metadatalistJson key="Annotation" list=annotations include=include_sensitive />
<@metadata key="Record URL" var=record_url />
<#-- END of Common Metadata -->
<#-- Start of Stock/Fishery Common Metadata -->
<@metadatalist key="Similar GRSF Record" namespace=identity_namespace list=similar_grsf_record />
<@metadatalist key="Connected Stock Record" namespace=identity_namespace list=connected />
<@metadatalist key="Data Owner" namespace=data_namespace list=data_owner include=include_sensitive />
<@timeseries key="Catch" namespace=data_namespace timeseries="catches" groupname="catch-group" />
<@timeseries key="Landing" namespace=data_namespace timeseries="landings" groupname="landing-group" />
@ -42,15 +55,10 @@
<@metadata key="Status of the Record" var=status_grsf_record />
<@metadata key="spatial" var=spatial />
<@metadata key="Domain" var="Fishery" />
<@metadata key="GRSF UUID" var=grsf_uuid />
<@metadata key="Citation" var=citation />
<@metadatalistJson key="Annotation" list=annotations include=include_sensitive />
<#-- END of Common Metadata -->
<#-- END of Stock/Fishery Common Metadata -->
<#-- START of Fishery Metadata -->
<@metadata key="GRSF Fishery Name" namespace=identity_namespace var=fishery_name />
<@metadata key="GRSF Semantic Identifier" namespace=identity_namespace var=grsf_semantic_identifier />
<#if traceability_flag??>
<@metadata key="Traceability Flag" var=traceability_flag?c />
<#if traceability_flag>
@ -65,14 +73,6 @@
<@metadatalist key="Management Body/Authority" namespace=identity_namespace list=management_body_authorities />
<@metadatalist key="Resources Exploited" namespace=identity_namespace list=resources_exploited />
<#-- END of Fishery Metadata -->
<@metadata key="Record URL" var=record_url />
<#if source = "grsf">
<@metadata key="system:type" var=grsf_type?capitalize sep=""/>
<#else>
<@metadata key="system:type" var="Legacy" sep=""/>
</#if>
],
"organization": <@source_macro />
"groups": [
@ -82,7 +82,7 @@
"title": "${group.title}"
},
</#list>
<@group name="fishery-group" title="Fishery" var="OK" sep=""/>
<@group name="fishery-group" title="Fishery" var="OK" sep="" />
],
"tags": [
<#list tag_list as tag>
@ -90,7 +90,7 @@
</#list>
<@tag tagname=connections_indicator />
<@tag tagname=similarities_indicator />
<@tag tagname=grsf_type?capitalize sep=""/>
<@tag tagname=grsf_type?capitalize sep="" />
],
"resources": [
<@resources var=source_of_information /><#if refers_to?? && source_of_information??>,</#if>
@ -105,4 +105,4 @@
}<#sep>,</#sep>
</#list>
]
}
}

View File

@ -15,8 +15,14 @@
"version" : "${version?string["0.0"]}",
"extras": [
<#-- START of Common Metadata -->
<#if source = "grsf">
<@metadata key="system:type" var=grsf_type?capitalize sep="" />
<#else>
<@metadata key="system:type" var="Legacy" sep="" />
</#if>
<@metadata key="GRSF Type" namespace=identity_namespace var=grsf_type?capitalize />
<@metadata key="Short Name" namespace=identity_namespace var=short_name />
<@metadata key="GRSF Semantic Identifier" namespace=identity_namespace var=grsf_semantic_identifier />
<#if database_sources??>
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
<#if source = "grsf">
@ -25,10 +31,17 @@
</#list>
</#if>
</#if>
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true/>
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true />
<@metadata key="Domain" var="Stock" />
<@metadata key="GRSF UUID" var=grsf_uuid />
<@metadata key="Citation" var=citation />
<@metadatalistJson key="Annotation" list=annotations include=include_sensitive />
<@metadata key="Record URL" var=record_url />
<#-- END of Common Metadata -->
<#-- Start of Stock/Fishery Common Metadata -->
<@metadatalist key="Similar GRSF Record" namespace=identity_namespace list=similar_grsf_record />
<@metadatalist key="Connected Fishery Record" namespace=identity_namespace list=connected />
<@metadatalist key="Data Owner" namespace=data_namespace list=data_owner include=include_sensitive />
<@timeseries key="Catch" namespace=data_namespace timeseries="catches" groupname="catch-group" />
<@timeseries key="Landing" namespace=data_namespace timeseries="landings" groupname="landing-group" />
@ -42,16 +55,10 @@
<@metadata key="Status of the Record" var=status_grsf_record />
<@metadata key="spatial" var=spatial />
<@metadata key="Domain" var="Stock" />
<@metadata key="GRSF UUID" var=grsf_uuid />
<@metadata key="Citation" var=citation />
<@metadatalistJson key="Annotation" list=annotations include=include_sensitive />
<#-- END of Common Metadata -->
<#-- END of Stock/Fishery Common Metadata -->
<#-- START of Stock Metadata -->
<@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="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" />
@ -65,14 +72,6 @@
<@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 -->
<@metadata key="Record URL" var=record_url />
<#if source = "grsf">
<@metadata key="system:type" var=grsf_type?capitalize sep=""/>
<#else>
<@metadata key="system:type" var="Legacy" sep=""/>
</#if>
],
"organization": <@source_macro />
"groups": [
@ -84,7 +83,7 @@
</#list>
<@group name="assessment-method-group" title="Assessment Method" var=assessment_methods />
<@group name="scientific-advice-group" title="Scientific Advice" var=scientific_advice />
<@group name="stock-group" title="Stock" var="OK" sep=""/>
<@group name="stock-group" title="Stock" var="OK" sep="" />
],
"tags": [
<#list tag_list as tag>
@ -92,7 +91,7 @@
</#list>
<@tag tagname=connections_indicator />
<@tag tagname=similarities_indicator />
<@tag tagname=grsf_type?capitalize sep=""/>
<@tag tagname=grsf_type?capitalize sep="" />
],
"resources": [
<@resources var=source_of_information /><#if refers_to?? && source_of_information??>,</#if>
@ -107,4 +106,4 @@
}<#sep>,</#sep>
</#list>
]
}
}

View File

@ -14,30 +14,37 @@
</#if>
"version" : "${version?string["0.0"]}",
"extras": [
<#if database_sources??>
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
</#if>
<@metadata key="GRSF Traceability Unit Name" namespace=identity_namespace var=traceability_unit_name />
<@metadata key="GRSF Semantic Identifier" namespace=identity_namespace var=grsf_semantic_identifier />
<#-- START of Common Metadata -->
<@metadata key="system:type" var="Traceability Unit" sep="" />
<@metadata key="GRSF Type" namespace=identity_namespace var="Traceability Unit" />
<@metadata key="Short Name" namespace=identity_namespace var=short_name />
<@metadata key="GRSF Semantic Identifier" namespace=identity_namespace var=grsf_semantic_identifier />
<#if database_sources??>
<@metadatalist key="Database Source" namespace=identity_namespace list=database_sources />
<#if source = "grsf">
<#list database_sources as database_source>
<#assign group_list += [{"name":"${database_source_name_to_id[database_source?json_string]}-group", "title":"${database_source?json_string}"}] >
</#list>
</#if>
</#if>
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true />
<@metadata key="Domain" var="Traceability Unit" />
<@metadata key="GRSF UUID" var=grsf_uuid />
<@metadata key="Citation" var=citation />
<@metadatalistJson key="Annotation" list=annotations include=include_sensitive />
<@metadata key="Record URL" var=record_url />
<#-- END of Common Metadata -->
<#-- START of Traceability Unit Metadata -->
<@metadata key="GRSF Traceability Unit Name" namespace=identity_namespace var=traceability_unit_name />
<@metadata key="Connected Stock Record" namespace=identity_namespace var=referring_stock_record.url />
<@metadata key="Connected Fishery Record" namespace=identity_namespace var=referring_fishery_record.url />
<@metadatalist key="Species" namespace=identity_namespace list=species tagValues=true />
<@metadatalist key="Assessment Area" namespace=identity_namespace list=assessment_area />
<@metadatalist key="Management/Reporting Area" namespace=identity_namespace list=management_reporting_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 />
<@metadatalist key="Management Body/Authority" namespace=identity_namespace list=management_body_authorities />
<@metadata key="Domain" var="Traceability Unit" />
<@metadata key="GRSF UUID" var=grsf_uuid />
<@metadata key="Citation" var=citation />
<@metadatalistJson key="Annotation" list=annotations include=include_sensitive />
<@metadata key="Record URL" var=record_url />
<@metadata key="system:type" var="Traceability Unit" sep=""/>
<#-- END of Traceability Unit Metadata -->
],
"organization": <@source_macro />
"groups": [
@ -47,13 +54,13 @@
"title": "${group.title}"
},
</#list>
<@group name="traceability-unit-group" title="Traceability Unit" var="OK" sep=""/>
<@group name="traceability-unit-group" title="Traceability Unit" var="OK" sep="" />
],
"tags": [
<#list tag_list as tag>
<@tagbyvalue value=tag include=true />
</#list>
<@tag tagname="Traceability Unit" sep=""/>
<@tag tagname="Traceability Unit" sep="" />
],
"resources": [
<#if !is_patch && referring_stock_record?has_content>
@ -62,7 +69,7 @@
<#if !is_patch && referring_fishery_record?has_content>
<@resource name="GRSF Fishery" url=referring_fishery_record.url description=referring_fishery_record.semantic_id />
</#if>
<@resource name="Traceability Unit URI" url=traceability_record_uri sep=""/>
<@resource name="Traceability Unit URI" url=traceability_record_uri sep="" />
],
"timeseries": [
<#list timeseries_list as elem>
@ -73,4 +80,4 @@
}<#sep>,</#sep>
</#list>
]
}
}

View File

@ -128,7 +128,7 @@
<#macro source_macro sep=",">
<#local source_title = "${database_source_id_to_name[source]}" >
<#if source = "grsf">
<#assign group_list += [{"name":"${source}", "title":"${source_title}"}] >
<#assign group_list += [{"name":"${source}-group", "title":"${source_title}"}] >
<#else>
<#assign group_list += [{"name":"legacy-group", "title":"Legacy"}] >
</#if>