Skip to content
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
4 changes: 2 additions & 2 deletions src/main/plugin/dcat-ap/dcat-profiles.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@
<dcatVersion>2.0.0</dcatVersion>
</profile>

<profile uri="https://healthdataeu.pages.code.europa.eu/healthdcat-ap/releases/release-7/">
<profile uri="https://healthdataeu.pages.code.europa.eu/healthdcat-ap/releases/release-8/">
<alias>HealthDCAT-AP</alias>
<description>The HealthDCAT Application Profile (HealthDCAT-AP) is a domain-specific metadata model designed to support the implementation of the secondary use framework under the European Health Data Space (EHDS).</description>
<versionInfo>7.0.0</versionInfo>
<versionInfo>8.0.0</versionInfo>
<dcatVersion>3.0.0</dcatVersion>
</profile>

Expand Down
53 changes: 40 additions & 13 deletions src/main/plugin/dcat-ap/formatter/xsl-view/view.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
xmlns:schema="http://schema.org/"
xmlns:mdcat="https://data.vlaanderen.be/ns/metadata-dcat#"
xmlns:mobilitydcatap="https://w3id.org/mobilitydcat-ap#"
xmlns:healthdcatap="http://healthdataportal.eu/ns/health#"
xmlns:csvw="http://www.w3.org/ns/csvw#"
xmlns:dpv="https://w3id.org/dpv#"
xmlns:gn-fn-render="http://geonetwork-opensource.org/xsl/functions/render"
xmlns:gn-fn-metadata="http://geonetwork-opensource.org/xsl/functions/metadata"
xmlns:gn-fn-dcat-ap="http://geonetwork-opensource.org/xsl/functions/profiles/dcat-ap"
Expand Down Expand Up @@ -365,13 +368,17 @@
</xsl:variable>

<xsl:variable name="name" select="name($nodes/*[1])"/>
<xsl:variable name="parentName" select="tokenize(@in, '/')[last()]"/>
<xsl:variable name="thesaurusConfigWithContext" select="$configuration/editor/fields/for[@name = $name and @xpath = $parentName]/directiveAttributes/@thesaurus"/>
<xsl:variable name="thesaurusConfigWithName" select="$configuration/editor/fields/for[@name = $name][1]/directiveAttributes/@thesaurus"/>
<xsl:variable name="thesaurusConfig" select="if (normalize-space($thesaurusConfigWithContext) != '') then $thesaurusConfigWithContext else $thesaurusConfigWithName"/>
<xsl:variable name="thesaurusId">
<xsl:choose>
<xsl:when test="normalize-space(directiveAttributes/@thesaurus) != ''">
<xsl:value-of select="normalize-space(directiveAttributes/@thesaurus)"/>
</xsl:when>
<xsl:when test="normalize-space($configuration/editor/fields/for[@name = $name][1]/directiveAttributes/@thesaurus) != ''">
<xsl:value-of select="normalize-space($configuration/editor/fields/for[@name = $name][1]/directiveAttributes/@thesaurus)"/>
<xsl:when test="normalize-space($thesaurusConfig) != ''">
<xsl:value-of select="normalize-space($thesaurusConfig)"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
Expand Down Expand Up @@ -469,7 +476,8 @@
<xsl:template mode="render-field" match="dct:LicenseDocument/dct:identifier"/>

<!-- Field with lang : display only field of current lang or first one if not exist -->
<xsl:template mode="render-field" match="dct:title|dct:description|foaf:name|adms:versionNotes|foaf:firstName|foaf:surname|cnt:characterEncoding|mobilitydcatap:dataFormatNotes|oa:hasBody">
<xsl:template mode="render-field" match="dct:title|dct:description|dct:alternative|foaf:name|adms:versionNotes|foaf:firstName|foaf:surname|cnt:characterEncoding|mobilitydcatap:dataFormatNotes|oa:hasBody|
healthdcatap:populationCoverage|csvw:name|csvw:title|csvw:datatype">
<xsl:param name="xpath"/>
<xsl:variable name="stringValue" select="string()"/>
<xsl:variable name="name" select="name()"/>
Expand Down Expand Up @@ -503,7 +511,8 @@
*:endDate|vcard:street-address|vcard:locality|vcard:postal-code|vcard:country-name|
vcard:hasTelephone|vcard:fn|vcard:organization-name|skos:prefLabel|dcat:version|
adms:versionNotes|dcat:byteSize|dcat:hadRole|dcat:spatialResolutionInMeters|dcat:temporalResolution|mdcat:stars|owl:versionInfo|
locn:fullAddress|locn:poBox|locn:thoroughfare|locn:locatorDesignator|locn:locatorName|locn:postName|locn:postCode|locn:adminUnitL1|locn:adminUnitL2|locn:addressArea">
locn:fullAddress|locn:poBox|locn:thoroughfare|locn:locatorDesignator|locn:locatorName|locn:postName|locn:postCode|locn:adminUnitL1|locn:adminUnitL2|locn:addressArea|
healthdcatap:numberOfRecords|healthdcatap:numberOfUniqueIndividuals|healthdcatap:maxTypicalAge|healthdcatap:minTypicalAge">
<xsl:param name="xpath"/>
<xsl:variable name="stringValue" select="string()"/>
<xsl:if test="normalize-space($stringValue) != ''">
Expand Down Expand Up @@ -557,27 +566,38 @@
</xsl:template>

<xsl:template mode="render-field"
match="dcatap:applicableLegislation">
match="dcatap:applicableLegislation|dcatap:hvdCategory|
dpv:hasPersonalData|healthdcatap:hasCodingSystem|
healthdcatap:healthTheme|healthdcatap:healthCategory|dcat:Dataset/dct:type"
priority="2">
<xsl:param name="xpath"/>
<xsl:variable name="elementName" select="name(.)"/>
<xsl:variable name="thesaurusId" select="$configuration/editor/fields/for[@name = $elementName]/directiveAttributes/@thesaurus"/>
<xsl:variable name="stringValue" select="string(@rdf:resource)"/>
<xsl:variable name="thesaurusId" select="($configuration/editor/fields/for[@name = $elementName]/directiveAttributes/@thesaurus)[1]"/>
<xsl:variable name="stringValue"
select="if ($elementName = ('dpv:hasPersonalData', 'healthdcatap:hasCodingSystem', 'healthdcatap:healthTheme', 'healthdcatap:healthCategory', 'dcatap:hvdCategory', 'dct:type')) then */@rdf:about else string(@rdf:resource)"/>

<xsl:if test="normalize-space($stringValue) != ''">
<tr>
<th style="{$thStyle}">
<xsl:value-of select="gn-fn-metadata:getLabel($schema, 'rdf:resource', $labels, name(.), '', concat(gn-fn-dcat-ap:concatXPaths($xpath, gn-fn-metadata:getXPath(.), name(.)), '/@rdf:resource'))/label" />
<xsl:variable name="fieldLabel"
select="gn-fn-metadata:getLabel($schema, 'rdf:resource', $labels, name(.), '', concat(gn-fn-dcat-ap:concatXPaths($xpath, gn-fn-metadata:getXPath(.), name(.)), '/@rdf:resource'))/label" />
<xsl:variable name="thesaurusTitle"
select="util:getThesaurusTitleByKey($thesaurusId)"/>
<xsl:value-of select="$thesaurusTitle"/>
</th>
<td style="{$tdStyle}">
<xsl:variable name="defaultLabel" select="util:getKeywordValueByUri($stringValue, $thesaurusId, $defaultLang)"/>
<xsl:variable name="defaultLabelInEnglish" select="util:getKeywordValueByUri($stringValue, $thesaurusId, 'eng')"/>
<xsl:variable name="label" select="if (normalize-space($defaultLabel) != '') then $defaultLabel else $defaultLabelInEnglish"/>
<xsl:choose>
<xsl:when test="normalize-space($defaultLabel)!=''">
<xsl:when test="normalize-space($label) != ''">
<xsl:call-template name="render-url">
<xsl:with-param name="href" select="@rdf:resource"/>
<xsl:with-param name="label" select="$defaultLabel"/>
<xsl:with-param name="href" select="$stringValue"/>
<xsl:with-param name="label" select="$label"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="render-url" select="@rdf:resource" />
<xsl:apply-templates mode="render-url" select="$stringValue" />
</xsl:otherwise>
</xsl:choose>
</td>
Expand Down Expand Up @@ -614,6 +634,7 @@
mobilitydcatap:grammar">
<xsl:param name="xpath"/>
<xsl:variable name="name" select="name()"/>

<xsl:if test="not(preceding-sibling::*[name(.) = $name and position()=1])">
<xsl:for-each-group select="../*[name() = $name]" group-by="concat(name(), ' | ', skos:Concept/skos:inScheme/@rdf:resource)">
<tr>
Expand Down Expand Up @@ -729,7 +750,8 @@
</xsl:template>

<!-- render nested content, but with the header above the table -->
<xsl:template mode="render-field" match="locn:address|dct:LicenseDocument|dct:RightsStatement|dct:rightsHolder|dct:Standard|dqv:QualityAnnotation|mobilitydcatap:Assessment">
<xsl:template mode="render-field" match="locn:address|dct:LicenseDocument|dct:RightsStatement|dct:rightsHolder|dct:Standard|dqv:QualityAnnotation|mobilitydcatap:Assessment|
healthdcatap:hasVariables|healthdcatap:hdab|csvw:TableGroup|csvw:table|csvw:column">
<xsl:param name="xpath"/>
<xsl:variable name="stringValue" select="string()"/>
<!-- Special case for dct:license with an empty dct:LicenseDocument with only @rdf:about or for dcat:contactPoint with only vcard:hasEmail and vcard:hasURL-->
Expand Down Expand Up @@ -850,9 +872,14 @@
</xsl:template>

<xsl:template mode="render-concept" match="skos:Concept">
<xsl:param name="thesaurusId"/>

<xsl:variable name="usedLang" select="if (normalize-space(skos:prefLabel[@xml:lang=$langId-2char][1]) != '')
then $langId-2char
else $defaultLang-2char"/>

<xsl:variable name="labelInEnglish" select="util:getKeywordValueByUri(@rdf:about, $thesaurusId, 'eng')"/>

<xsl:choose>
<xsl:when test="count(skos:prefLabel[@xml:lang=$usedLang]) > 0">
<xsl:for-each select="skos:prefLabel[@xml:lang=$usedLang]">
Expand Down
28 changes: 10 additions & 18 deletions src/main/plugin/dcat-ap/layout/config-editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -575,21 +575,13 @@
<for name="healthdcatap:numberOfUniqueIndividuals" use="number"/>
<for name="healthdcatap:maxTypicalAge" use="number"/>
<for name="healthdcatap:minTypicalAge" use="number"/>
<for name="healthdcatap:populationCoverage" use="textarea"/>
<for name="dqv:value" use="number"/>
<for name="cv:email" templateModeOnly="true" forceLabel="true" label="key">
<template>
<values>
<key label="key" xpath="@rdf:resource" tooltip="cv:email"/>
</values>
<snippet>
<cv:email rdf:resource="{{key}}"/>
</snippet>
</template>
</for>

<for name="dct:type" xpath="dcat:Dataset" use="thesaurus-list-picker">
<directiveAttributes
thesaurus="external.theme.dataset-type"
xpath="/dcat:Dataset/dct:type"
xpath="/dct:type"
max="1"
labelKey="dcat.addType"/>
</for>
Expand Down Expand Up @@ -3215,13 +3207,13 @@
</dct:Standard>
</dct:conformsTo>
</snippet>
<snippet label="dcat-ap-health-700">
<snippet label="dcat-ap-health-800">
<dct:conformsTo>
<dct:Standard
rdf:about="https://healthdataeu.pages.code.europa.eu/healthdcat-ap/releases/release-7/">
rdf:about="https://healthdataeu.pages.code.europa.eu/healthdcat-ap/releases/release-8/">
<dct:title xml:lang="en">HealthDCAT-AP</dct:title>
<dct:description xml:lang="en">The HealthDCAT Application Profile (HealthDCAT-AP) is a domain-specific metadata model designed to support the implementation of the secondary use framework under the European Health Data Space (EHDS).</dct:description>
<owl:versionInfo>7.0.0</owl:versionInfo>
<owl:versionInfo>8.0.0</owl:versionInfo>
</dct:Standard>
</dct:conformsTo>
</snippet>
Expand Down Expand Up @@ -3409,7 +3401,7 @@
<dqv:inDimension rdf:resource="http://quantumproject.eu/vocab-quantum/#Data_provenance"/>
</dqv:Metric>
</dqv:isMeasurementOf>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">2</dqv:value>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"></dqv:value>
</dqv:QualityMeasurement>
</dqv:hasQualityMeasurement>
</snippet>
Expand Down Expand Up @@ -3440,7 +3432,7 @@
<dqv:inDimension rdf:resource="http://quantumproject.eu/vocab-quantum/#Metadata_scope"/>
</dqv:Metric>
</dqv:isMeasurementOf>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</dqv:value>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"></dqv:value>
</dqv:QualityMeasurement>
</dqv:hasQualityMeasurement>
</snippet>
Expand Down Expand Up @@ -3470,7 +3462,7 @@
<dqv:inDimension rdf:resource="http://quantumproject.eu/vocab-quantum/#Coherence"/>
</dqv:Metric>
</dqv:isMeasurementOf>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</dqv:value>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"></dqv:value>
</dqv:QualityMeasurement>
</dqv:hasQualityMeasurement>
</snippet>
Expand All @@ -3485,7 +3477,7 @@
<dqv:inDimension rdf:resource="http://quantumproject.eu/vocab-quantum/#Completeness"/>
</dqv:Metric>
</dqv:isMeasurementOf>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer">1</dqv:value>
<dqv:value rdf:datatype="http://www.w3.org/2001/XMLSchema#integer"></dqv:value>
</dqv:QualityMeasurement>
</dqv:hasQualityMeasurement>
</snippet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@
<xsl:when test="$xpath = (
'./dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:distribution/dcat:Distribution/dct:rights/dct:RightsStatement/dct:type',
'./dcat:Catalog/dcat:dataset/dcat:Dataset/dcat:distribution/dcat:Distribution/mobilitydcatap:mobilityDataStandard',
'./dcat:Catalog/dcat:dataset/dcat:Dataset/dpv:hasPersonalData'
'./dcat:Catalog/dcat:dataset/dcat:Dataset/dpv:hasPersonalData',
'./dcat:Catalog/dcat:dataset/dcat:Dataset/healthdcatap:hasCodingSystem'
)">
<xsl:value-of select="$xpath"/>
</xsl:when>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/dut/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@
<label>Name</label>
<description>A Technical name given to the Variable as it appears in the CSV file.</description>
</element>
<element name="csvw:titles">
<element name="csvw:title">
<label>Title</label>
<description>A Human-readable name given to the Variable.</description>
</element>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/dut/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<health-view>Health dataset</health-view>
<health-view-quantum>Health dataset (Quantum fields)</health-view-quantum>
<health-view-optional>Health dataset (optional)</health-view-optional>
<dcat-ap-health-700>Health DCAT-AP - 7.0.0</dcat-ap-health-700>
<dcat-ap-health-800>Health DCAT-AP - 8.0.0</dcat-ap-health-800>
<health-dcat-ap-quality-measurements-Accessibility_measurement1>Access and provision / Accessibility / Availability of a data access &amp; usage policy</health-dcat-ap-quality-measurements-Accessibility_measurement1>
<health-dcat-ap-quality-measurements-Accessibility_measurement2>Access and provision / Accessibility / Average time from data access application to data release</health-dcat-ap-quality-measurements-Accessibility_measurement2>
<health-dcat-ap-quality-measurements-Population_coverage_measurement1>Coverage / Popuplation coverage / Coverage Rate</health-dcat-ap-quality-measurements-Population_coverage_measurement1>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/eng/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@
<label>Name</label>
<description>A Technical name given to the Variable as it appears in the CSV file.</description>
</element>
<element name="csvw:titles">
<element name="csvw:title">
<label>Title</label>
<description>A Human-readable name given to the Variable.</description>
</element>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/eng/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<health-view>Health dataset</health-view>
<health-view-quantum>Health dataset (Quantum fields)</health-view-quantum>
<health-view-optional>Health dataset (optional)</health-view-optional>
<dcat-ap-health-700>Health DCAT-AP - 7.0.0</dcat-ap-health-700>
<dcat-ap-health-800>Health DCAT-AP - 8.0.0</dcat-ap-health-800>
<health-dcat-ap-quality-measurements-Accessibility_measurement1>Access and provision / Accessibility / Availability of a data access &amp; usage policy</health-dcat-ap-quality-measurements-Accessibility_measurement1>
<health-dcat-ap-quality-measurements-Accessibility_measurement2>Access and provision / Accessibility / Average time from data access application to data release</health-dcat-ap-quality-measurements-Accessibility_measurement2>
<health-dcat-ap-quality-measurements-Population_coverage_measurement1>Coverage / Popuplation coverage / Coverage Rate</health-dcat-ap-quality-measurements-Population_coverage_measurement1>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/fre/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@
<label>Name</label>
<description>A Technical name given to the Variable as it appears in the CSV file.</description>
</element>
<element name="csvw:titles">
<element name="csvw:title">
<label>Title</label>
<description>A Human-readable name given to the Variable.</description>
</element>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/fre/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<health-view>Health dataset</health-view>
<health-view-quantum>Health dataset (Quantum fields)</health-view-quantum>
<health-view-optional>Health dataset (optional)</health-view-optional>
<dcat-ap-health-700>Health DCAT-AP - 7.0.0</dcat-ap-health-700>
<dcat-ap-health-800>Health DCAT-AP - 8.0.0</dcat-ap-health-800>
<health-dcat-ap-quality-measurements-Accessibility_measurement1>Access and provision / Accessibility / Availability of a data access &amp; usage policy</health-dcat-ap-quality-measurements-Accessibility_measurement1>
<health-dcat-ap-quality-measurements-Accessibility_measurement2>Access and provision / Accessibility / Average time from data access application to data release</health-dcat-ap-quality-measurements-Accessibility_measurement2>
<health-dcat-ap-quality-measurements-Population_coverage_measurement1>Coverage / Popuplation coverage / Coverage Rate</health-dcat-ap-quality-measurements-Population_coverage_measurement1>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/ger/labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2597,7 +2597,7 @@
<label>Name</label>
<description>A Technical name given to the Variable as it appears in the CSV file.</description>
</element>
<element name="csvw:titles">
<element name="csvw:title">
<label>Title</label>
<description>A Human-readable name given to the Variable.</description>
</element>
Expand Down
2 changes: 1 addition & 1 deletion src/main/plugin/dcat-ap/loc/ger/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<health-view>Health dataset</health-view>
<health-view-quantum>Health dataset (Quantum fields)</health-view-quantum>
<health-view-optional>Health dataset (optional)</health-view-optional>
<dcat-ap-health-700>Health DCAT-AP - 7.0.0</dcat-ap-health-700>
<dcat-ap-health-800>Health DCAT-AP - 8.0.0</dcat-ap-health-800>
<health-dcat-ap-quality-measurements-Accessibility_measurement1>Access and provision / Accessibility / Availability of a data access &amp; usage policy</health-dcat-ap-quality-measurements-Accessibility_measurement1>
<health-dcat-ap-quality-measurements-Accessibility_measurement2>Access and provision / Accessibility / Average time from data access application to data release</health-dcat-ap-quality-measurements-Accessibility_measurement2>
<health-dcat-ap-quality-measurements-Population_coverage_measurement1>Coverage / Popuplation coverage / Coverage Rate</health-dcat-ap-quality-measurements-Population_coverage_measurement1>
Expand Down
3 changes: 2 additions & 1 deletion src/main/plugin/dcat-ap/schema/csvw.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<xs:element name="TableGroup">
<xs:complexType>
<xs:sequence>
<xs:element ref="dct:title" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="table" type="csvw:Table_type" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Expand Down Expand Up @@ -49,7 +50,7 @@
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="rdf:PlainLiteral" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="titles" type="rdf:PlainLiteral" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="title" type="rdf:PlainLiteral" minOccurs="1" maxOccurs="unbounded"/>
<xs:element ref="dct:description" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="datatype" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="propertyUrl" type="xs:anyURI" minOccurs="0" maxOccurs="1"/>
Expand Down
Loading