Skip to content

Commit

Permalink
Merge branch 'ELTER-36_fix_deimsTTL' into 'develop'
Browse files Browse the repository at this point in the history
Resolve ELTER-36 "Fix deimsttl"

Closes ELTER-36

See merge request eip/catalogue!557
  • Loading branch information
WillOnGit committed Dec 12, 2023
2 parents f71540a + 4772a96 commit fddff19
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
})
public class ElterDocument extends AbstractMetadataDocument implements WellKnownText {
private static final Set<String> ALLOWED_CITATION_FUNCTIONS = Set.of("isReferencedBy", "isSupplementTo");
private static final String TOPIC_PROJECT_URL = "http://onto.nerc.ac.uk/CEHMD/";
private String otherCitationDetails, lineage, reasonChanged, metadataStandardName, metadataStandardVersion, dataLevel;
private List<String> alternateTitles, spatialRepresentationTypes, datasetLanguages, securityConstraints;
private List<Keyword> topicCategories, elterProject;
Expand Down
8 changes: 7 additions & 1 deletion templates/rdf/_body.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
prov:wasGeneratedBy <@projectList /> ;
</#if>

<#if deimsSites?has_content>
prov:atLocation <@deimsList />
;
</#if>

<#if funding?has_content>
prov:wasGeneratedBy <@fundingList /> ;
</#if>
Expand Down Expand Up @@ -97,4 +102,5 @@
</#if>

<@fundingDetail />
<@projectDetail />
<@projectDetail />
<@deimsDetail />
58 changes: 43 additions & 15 deletions templates/rdf/_macros.ftlh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,34 @@
</#if>
</#macro>

<#macro fundingList>
<#if funding?has_content>
<#list funding as fund>

<#assign fundIdentifier= id + "_fund" + fund?index>
<#if fund.awardURI?has_content>
<#assign fundIdentifier=fund.awardURI>
</#if>
<${fundIdentifier?no_esc}><#sep>,</#sep>
</#list>
</#if>
</#macro>

<#macro fundingDetail>
<#if funding?has_content>
<#list funding as fund>

<#assign fundIdentifier= id + "_proj" + fund?index>
<#if fund.awardURI?has_content>
<#assign fundIdentifier=fund.awardURI>
</#if>

<${fundIdentifier?no_esc}> a prov:Activity ; <#if fund.awardTitle?has_content>rdfs:label "${fund.awardTitle}"</#if> .
</#list>
</#if>
</#macro>

<#--ELTER -->
<#macro projectList>
<#if elterProject?has_content>
<#list elterProject as project>
Expand Down Expand Up @@ -98,30 +126,30 @@
</#if>
</#macro>

<#macro fundingList>
<#if funding?has_content>
<#list funding as fund>
<#macro deimsList>
<#if deimsSites?has_content>
<#list deimsSites as deimsSite>

<#assign fundIdentifier= id + "_fund" + fund?index>
<#if fund.awardURI?has_content>
<#assign fundIdentifier=fund.awardURI>
<#assign deimsID= id + "_site" + deimsSite?index>
<#if deimsSite.url?has_content>
<#assign deimsID=deimsSite.url>
</#if>
<${fundIdentifier?no_esc}><#sep>,</#sep>
<${deimsID?no_esc}><#sep>,</#sep>
</#list>
</#if>
</#macro>

<#macro fundingDetail>
<#if funding?has_content>
<#list funding as fund>
<#macro deimsDetail>
<#if deimsSites?has_content>
<#list deimsSites as deimsSite>

<#assign fundIdentifier= id + "_proj" + fund?index>
<#if fund.awardURI?has_content>
<#assign fundIdentifier=fund.awardURI>
<#assign deimsID= id + "_site" + deimsSite?index>
<#if deimsSite.url?has_content>
<#assign deimsID=deimsSite.url>
</#if>

<${fundIdentifier?no_esc}> a prov:Activity ; <#if fund.awardTitle?has_content>rdfs:label "${fund.awardTitle}"</#if> .
<${deimsID?no_esc}> a prov:Location; <#if deimsSite.title?has_content>rdfs:label "${deimsSite.title}"</#if> .
</#list>
</#if>
</#macro>

<#--END ELTER-->
1 change: 1 addition & 0 deletions templates/rdf/ttl.ftlh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<#ftl encoding="UTF-8">
<#compress>
<#-- Keywords -->
<#assign allKeywords = []>
Expand Down
95 changes: 94 additions & 1 deletion templates/xml/gemini.ftlx
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
<#macro pointOfContact contact>
<gmd:pointOfContact>
<gmd:CI_ResponsibleParty>
<#if contact.individualName?has_content>
<gmd:individualName>
<#if contact.nameIdentifier?has_content && contact.nameIdentifier?matches("^http(|s)://orcid.org/\\d{4}-\\d{4}-\\d{4}-\\d{3}(X|\\d)$")>
<gmx:Anchor xlink:href="${contact.nameIdentifier}" xlink:actuate="onRequest" xlink:title="orcid">${contact.individualName}</gmx:Anchor>
<#else>
<gco:CharacterString>${contact.individualName}</gco:CharacterString>
</#if>
</gmd:individualName>
</#if>
<#if contact.organisationName?has_content>
<gmd:organisationName>
<#if contact.organisationIdentifier?has_content && contact.organisationIdentifier?matches("^http(|s)://ror.org/\\w{8,10}$")>
<gmx:Anchor xlink:href="${contact.organisationIdentifier}" xlink:actuate="onRequest" xlink:title="RoR">${contact.organisationName}</gmx:Anchor>
<#else>
<gco:CharacterString>${contact.organisationName}</gco:CharacterString>
</#if>
</gmd:organisationName>
</#if>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<#if contact.deliveryPoint?has_content>
<gmd:deliveryPoint><gco:CharacterString>${contact.deliveryPoint}</gco:CharacterString></gmd:deliveryPoint>
</#if>
<#if contact.city?has_content>
<gmd:city><gco:CharacterString>${contact.city}</gco:CharacterString></gmd:city>
</#if>
<#if contact.administrativeArea?has_content>
<gmd:administrativeArea><gco:CharacterString>${contact.administrativeArea}</gco:CharacterString></gmd:administrativeArea>
</#if>
<#if contact.postalCode?has_content>
<gmd:postalCode><gco:CharacterString>${contact.postalCode}</gco:CharacterString></gmd:postalCode>
</#if>
<#if contact.country?has_content>
<gmd:country><gco:CharacterString>${contact.country}</gco:CharacterString></gmd:country>
</#if>
<gmd:electronicMailAddress><gco:CharacterString>[email protected]</gco:CharacterString></gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
<#if contact.nameIdentifier?has_content && contact.nameIdentifier?matches("^http(|s)://orcid.org/\\d{4}-\\d{4}-\\d{4}-\\d{3}(X|\\d)$")>
<gmd:onlineResource>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>${contact.nameIdentifier}</gmd:URL>
</gmd:linkage>
<gmd:name>
<gco:CharacterString>ORCID record</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>ORCID is an open, non-profit, community-driven effort to create and maintain a registry of unique researcher identifiers and a transparent method of linking research activities and outputs to these identifiers.</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onlineResource>
</#if>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<#if contact.role = "rightsHolder" >
<#assign contactRole='owner'>
<#else>
<#assign contactRole=contact.role >
</#if>
<gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#CI_RoleCode" codeListValue="${contactRole}">${contactRole}</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:pointOfContact>
</#macro>

<#setting number_format="0">
<#setting date_format = 'yyyy-MM-dd'>
<#compress>
Expand Down Expand Up @@ -29,7 +104,9 @@
</#if>
<gmd:contact>
<gmd:CI_ResponsibleParty>
<gmd:organisationName><gco:CharacterString>Environmental Information Data Centre</gco:CharacterString></gmd:organisationName>
<gmd:organisationName>
<gmx:Anchor xlink:href="https://ror.org/04xw4m193" xlink:actuate="onRequest" xlink:title="RoR">NERC EDS Environmental Information Data Centre</gmx:Anchor>
</gmd:organisationName>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
Expand All @@ -41,6 +118,22 @@
<gmd:electronicMailAddress><gco:CharacterString>[email protected]</gco:CharacterString></gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
<gmd:onlineResource>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>https://eidc.ac.uk/</gmd:URL>
</gmd:linkage>
<gmd:name>
<gco:CharacterString>EIDC website</gco:CharacterString>
</gmd:name>
<gmd:description>
<gco:CharacterString>The Environmental Information Data Centre (EIDC) is the UK's national data centre for terrestrial and freshwater sciences.</gco:CharacterString>
</gmd:description>
<gmd:function>
<gmd:CI_OnLineFunctionCode codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml#CI_OnLineFunctionCode" codeListValue="information">information</gmd:CI_OnLineFunctionCode>
</gmd:function>
</gmd:CI_OnlineResource>
</gmd:onlineResource>
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
Expand Down
2 changes: 1 addition & 1 deletion templates/xml/iso19115/_dataQualityInfo.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
<gco:Date>2011-03-21</gco:Date>
</gmd:date>
<gmd:dateType>
<gmd:CI_DateTypeCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/codelist/ML_gmxCodelists.xml#CI_DateTypeCode" codeListValue="publication" >publication</gmd:CI_DateTypeCode>
<gmd:CI_DateTypeCode codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml##CI_DateTypeCode" codeListValue="publication" >publication</gmd:CI_DateTypeCode>
</gmd:dateType>
</gmd:CI_Date>
</gmd:date>
Expand Down
2 changes: 1 addition & 1 deletion templates/xml/iso19115/_descriptiveKeywords.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<#list keywordList as item>
<gmd:keyword>
<#if item.uri?has_content>
<gmx:Anchor xlink:href="${item.uri}">${item.value}</gmx:Anchor>
<gmx:Anchor xlink:href="${item.uri}" xlink:actuate="onRequest">${item.value}</gmx:Anchor>
<#else>
<gco:CharacterString>${item.value}</gco:CharacterString>
</#if>
Expand Down
2 changes: 1 addition & 1 deletion templates/xml/iso19115/_distributionInfo.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</gmd:CI_Contact>
</gmd:contactInfo>
<gmd:role>
<gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#CI_RoleCode" codeListValue="distributor">distributor</gmd:CI_RoleCode>
<gmd:CI_RoleCode codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml##CI_RoleCode" codeListValue="distributor">distributor</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:distributorContact>
Expand Down
7 changes: 4 additions & 3 deletions templates/xml/iso19115/_identificationInfo.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@
<#include "__abstract.ftlx">
<#if responsibleParties?has_content>
<#list responsibleParties as responsibleParty>
<gmd:pointOfContact>
<@pointOfContact responsibleParty />
<#--<gmd:pointOfContact>
<gmd:CI_ResponsibleParty>
<#if responsibleParty.individualName?has_content>
<gmd:individualName><gco:CharacterString>${responsibleParty.individualName}</gco:CharacterString></gmd:individualName>
Expand Down Expand Up @@ -118,10 +119,10 @@
<#else>
<#assign role=responsibleParty.role >
</#if>
<gmd:CI_RoleCode codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#CI_RoleCode" codeListValue="${role}">${role}</gmd:CI_RoleCode>
<gmd:CI_RoleCode codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml##CI_RoleCode" codeListValue="${role}">${role}</gmd:CI_RoleCode>
</gmd:role>
</gmd:CI_ResponsibleParty>
</gmd:pointOfContact>
</gmd:pointOfContact>-->
</#list>
</#if>
<#if resourceMaintenance??>
Expand Down
4 changes: 2 additions & 2 deletions templates/xml/iso19115/_resourceConstraints.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
</gmd:accessConstraints>
<gmd:otherConstraints>
<#if accessLimitation.code=="Restricted">
<gmx:Anchor xlink:href="${accessLimitation.uri}">${accessLimitation.value}</gmx:Anchor>
<gmx:Anchor xlink:href="${accessLimitation.uri}" xlink:actuate="onRequest">${accessLimitation.value}</gmx:Anchor>
<#elseif accessLimitation.code=="Available">
<#assign _value=accessLimitation.value>
<#if accessLimitation.value=="no limitations to public access">
<#assign _value="no limitations">
</#if>
<gmx:Anchor xlink:href="${accessLimitation.uri}">${_value}</gmx:Anchor>
<gmx:Anchor xlink:href="${accessLimitation.uri}" xlink:actuate="onRequest">${_value}</gmx:Anchor>
<#else>
<gco:CharacterString>${accessLimitation.code}</gco:CharacterString>
</#if>
Expand Down
4 changes: 2 additions & 2 deletions templates/xml/iso19115/_service.ftlx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</srv:coupledResource>
</#list>
<srv:couplingType>
<srv:SV_CouplingType codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#SV_CouplingType" codeListValue="${service.couplingType}">${service.couplingType}</srv:SV_CouplingType>
<srv:SV_CouplingType codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml##SV_CouplingType" codeListValue="${service.couplingType}">${service.couplingType}</srv:SV_CouplingType>
</srv:couplingType>
<#list service.containsOperations as containsOperation>
<srv:containsOperations>
Expand All @@ -30,7 +30,7 @@
<gco:CharacterString>${containsOperation.operationName}</gco:CharacterString>
</srv:operationName>
<srv:DCP>
<srv:DCPList codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/ML_gmxCodelists.xml#DCPList" codeListValue="${containsOperation.platform}">${containsOperation.platform}</srv:DCPList>
<srv:DCPList codeList="https://standards.iso.org/iso/19139/resources/gmxCodelists.xml##DCPList" codeListValue="${containsOperation.platform}">${containsOperation.platform}</srv:DCPList>
</srv:DCP>
<srv:connectPoint>
<gmd:CI_OnlineResource>
Expand Down

0 comments on commit fddff19

Please sign in to comment.