Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISO19115-3 / Merge latest changes made in metadata101 #4925

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,25 @@
<entry key="nonGeographicDataset" value="Dataset"/>
<entry key="dimensionGroup" value="TechArticle"/>
<entry key="featureType" value="Dataset"/>
<entry key="attribute" value="CreativeWork"/>
<entry key="attributeType" value="Thing"/>
<entry key="feature" value="Thing"/>
<entry key="propertyType" value="Thing"/>
<entry key="fieldSession" value="Project"/>
<entry key="software" value="SoftwareApplication"/>
<entry key="model" value="TechArticle"/>
<entry key="tile" value="Dataset"/>
<entry key="fieldSession" value="Project"/>
<entry key="metadata" value="ArchiveComponent"/>
<entry key="initiative" value="Thing"/>
<entry key="sample" value="ArchiveComponent"/>
<entry key="document" value="DigitalDocument"/>
<entry key="repository" value="ArchiveComponent"/>
<entry key="aggregate" value="ArchiveComponent"/>
<entry key="product" value="Product"/>
<entry key="collection" value="ArchiveComponent"/>
<entry key="coverage" value="CreativeWork"/>
<entry key="collectionSession" value="Project"/>

</xsl:variable>

<xsl:variable name="match"
Expand Down Expand Up @@ -153,15 +168,15 @@
"@context": "http://schema.org/",
<xsl:choose>
<xsl:when test="mdb:metadataScope/*/mdb:resourceScope/*/@codeListValue != ''">
"@type": "<xsl:value-of select="schema-org-fn:getType(mdb:metadataScope/*/mdb:resourceScope/*/@codeListValue, 'schema:')"/>",
"@type": "<xsl:value-of select="schema-org-fn:getType(mdb:metadataScope/*/mdb:resourceScope/*/@codeListValue,'')"/>",
</xsl:when>
<xsl:otherwise>
"@type": "schema:Dataset",
"@type": "Dataset",
</xsl:otherwise>
</xsl:choose>
<!-- TODO: Use the identifier property to attach any relevant Digital Object identifiers (DOIs). -->
"@id": "<xsl:value-of select="concat($baseUrl, 'api/records/', mdb:metadataIdentifier[1]/*/mcc:code/*/text())"/>",
"includedInDataCatalog":[{"url":"<xsl:value-of select="concat($baseUrl, 'search#', $catalogueName)"/>","name":"<xsl:value-of select="$catalogueName"/>"}],
"includedInDataCatalog":[{"@type":"DataCatalog","url":"<xsl:value-of select="concat($baseUrl, 'search#', $catalogueName)"/>","name":"<xsl:value-of select="$catalogueName"/>"}],
<!-- TODO: is the dataset language or the metadata language ? -->
"inLanguage":"<xsl:value-of select="if ($requestedLanguage != '') then $requestedLanguage else $defaultLanguage"/>",
<!-- TODO: availableLanguage -->
Expand Down Expand Up @@ -242,10 +257,12 @@
,"name": <xsl:apply-templates mode="toJsonLDLocalized"
select="."/>
</xsl:for-each>
<xsl:for-each select=".//cit:electronicMailAddress">
,"email": <xsl:apply-templates mode="toJsonLDLocalized"
select="."/>
</xsl:for-each>
<xsl:if test=".//cit:electronicMailAddress">
,"email": [<xsl:for-each select=".//cit:electronicMailAddress">
<xsl:apply-templates mode="toJsonLDLocalized" select="."/>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>]
</xsl:if>

<!-- TODO: only if children available -->
,"contactPoint": {
Expand Down Expand Up @@ -352,11 +369,13 @@
-->
</xsl:for-each>

<xsl:for-each select="mdb:identificationInfo/*/mri:resourceConstraints/mco:MD_LegalConstraints/mco:otherConstraints">
,"license": <xsl:apply-templates mode="toJsonLDLocalized"
select="."/>
</xsl:for-each>

<xsl:if test="mdb:identificationInfo/*/mri:resourceConstraints/mco:MD_LegalConstraints/mco:otherConstraints">
,"license": [<xsl:for-each select="mdb:identificationInfo/*/mri:resourceConstraints/mco:MD_LegalConstraints/mco:otherConstraints">
<xsl:apply-templates mode="toJsonLDLocalized" select="."/>
<xsl:if test="position() != last()">,</xsl:if>
</xsl:for-each>]
</xsl:if>
<!-- TODO: When a dataset derives from or aggregates several originals, use the isBasedOn property. -->
<!-- TODO: hasPart -->
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@
*[gml:beginPosition != '']|*[gml:endPosition != '']|
*[gco:Date != '']|*[gco:DateTime != '']|*[gco:TM_PeriodDuration != '']|
*[*/@codeListValue]|*[@codeListValue]|
gml:identifier[. != '']|gml:name[. != '']|
gml:description[. != '']|gml:timePosition[. != '']|
gml:beginPosition[. != '']|gml:endPosition[. != '']"
priority="500">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@
</entry>
<entry>
<code>dataCentre</code>
<label>Centre de données)</label>
<label>Centre de données</label>
<description>Mot clé qui identifie un dépôt de données ou une archive qui
gère et répartit des données
</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,36 @@
</xsl:template>


<xsl:template match="mri:descriptiveKeywords[not(*/mri:thesaurusName)]" priority="10">
<xsl:variable name="name" select="name()"/>
<xsl:variable name="freeTextKeywordBlockType"
select="*/mri:type/*/@codeListValue"/>
<xsl:variable name="isFirstFreeTextKeywordBlockOfThisType"
select="count(preceding-sibling::*[
name() = $name
and not(*/mri:thesaurusName)
and */mri:type/*/@codeListValue = $freeTextKeywordBlockType]) = 0"/>

<xsl:if test="$isFirstFreeTextKeywordBlockOfThisType">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<mri:MD_Keywords>
<xsl:apply-templates select="*/mri:keyword"/>

<!-- Combine all free text keyword of same type -->
<xsl:apply-templates select="following-sibling::*[
name() = $name
and not(*/mri:thesaurusName)
and */mri:type/*/@codeListValue = $freeTextKeywordBlockType]/*/mri:keyword"/>

<xsl:apply-templates select="*/mri:type"/>
</mri:MD_Keywords>
</xsl:copy>
</xsl:if>
</xsl:template>



<!-- Remove empty DQ elements, empty transfer options. -->
<xsl:template match="mdb:dataQualityInfo[count(*) = 0]"/>
<xsl:template match="mrd:transferOptions[mrd:MD_DigitalTransferOptions/count(*) = 0]"/>
Expand Down