Skip to content

Commit

Permalink
added orcid and ror to gemini xml template
Browse files Browse the repository at this point in the history
  • Loading branch information
phtrceh committed Dec 12, 2023
1 parent 37245cb commit 4772a96
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 11 deletions.
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 4772a96

Please sign in to comment.