DCAT updates for contacts and distributions#8992
DCAT updates for contacts and distributions#8992cmangeat wants to merge 4 commits intogeonetwork:mainfrom
Conversation
could be the case with iso19115-3.2018. tests can be found here: metadata101/iso19115-3.2018.che@2292b22
which do not carry 'cit:name', there is no group by loop. could be the case with iso19115-3.2018. tests can be found here: metadata101/iso19115-3.2018.che@0ea2205.
e808840 to
90669d3
Compare
| <xsl:choose> | ||
| <xsl:when test="$dcatElementConfig"> | ||
| <xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="cit:name"> | ||
| <xsl:for-each-group select="$allIndividualOrOrganisationWithoutIndividual" group-by="(cit:name,'individualDoesNotCarryACitName')[1]"> |
There was a problem hiding this comment.
as individuals do not carry a cit:name they will never be taken into account when for-each-group.
indeed, when grouping by something empty (such as cit:name for an individual), it is not looping, cf. group-by-expression.
the workaround explained here can be used.
(this said, if the purpose of the group by is to avoid an organisation to be returned redundantly, it seems that it does not work (iso19115-3-to-dcat-agent is called many times), as there is no need to change 'individualDoesNotCarryACitName' by generate-id() when many contacts (individual not from an org): with 'individualDoesNotCarryACitName' static, every contact are returned. If of use (not sure), could be better to simply change for-each-group by for-each and remove group-by ?).
| <xsl:otherwise> | ||
| <xsl:apply-templates mode="iso19115-3-to-dcat-distribution" | ||
| select="ancestor::mrd:MD_DigitalTransferOptions/mrd:distributionFormat/*/mrd:formatSpecificationCitation"/> | ||
| select="ancestor::mrd:MD_Distribution/mrd:distributionFormat/*/mrd:formatSpecificationCitation | |
There was a problem hiding this comment.
@fxprunayre can you check this change, I'm not really sure about this?
I assume that the original code only pointed to mrd:MD_DigitalTransferOptions to process the distribution formats defined in the same mrd:MD_DigitalTransferOptions container, no?
With the change, all formats defined at the distribution level will apply to each distribution.
There was a problem hiding this comment.
Indeed @josegar74 , maybe we can improve that.
In DCAT distribution object, the format is closely linked to the access URL.
In ISO, it is less true and it was a need that we mitigate with stuff like
#5465
Some users are also dispatching one download link in specific transferOptions in order to more closely link a URL with a format or a transferSize (dcat:byteSize) which in ISO are not in the online resource.
So I would not dispatch formats available in distribution ancestor everywhere. I would rather add an additional rule https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/dcat/dcat-core-distribution.xsl#L336-L339 and gives priority to transferOptions format if any and then fallback on distribution ones.
There was a problem hiding this comment.
Could fd0ce3b be an alternative ? i.e. adding an extra dcat distributiion section for formats from iso distribution info section level (not the ones in resources) ?
|
|
||
| <xsl:apply-templates mode="iso19115-3-to-dcat-distribution" | ||
| select="ancestor::mrd:MD_DigitalTransferOptions/mrd:distributionFormat/*/mrd:fileDecompressionTechnique"/> | ||
| select="ancestor::mrd:MD_Distribution/mrd:distributionFormat/*/mrd:fileDecompressionTechnique | |
|
@cmangeat, the pull request is updating also the geonetwork-ui submodule. I'm not sure if that's what's intended. Also maybe the pull request title could be changed to something more clear, like: |
… could be searched for fileDecompressionTechnique or formatSpecificationCitation
90669d3 to
2b20cfc
Compare
Thank you. Sorry for the geonetwork-ui submodule not updated. Adressing other comments soon. |
484d08e to
2fe67ce
Compare
2fe67ce to
fd0ce3b
Compare
|
@josegar74 @fxprunayre I believe we addressed all your comments in our last commit. Please confirm. |
|
|
||
| <xsl:template mode="iso19115-3-to-dcat" | ||
| match="mdb:distributionInfo/mrd:MD_Distribution/mrd:distributionFormat"> | ||
| <dcat:distribution> |
There was a problem hiding this comment.
Unless I'm really wrong, this element will be invalid. See https://semiceu.github.io/DCAT-AP/releases/3.0.0/#Distribution, access URL is required.
I think what @fxprunayre meant is to modify the existing template to process the online resources, to use the transferOptions format if exists, otherwise use the distribution ones as you did in the original code.
I would rather add an additional rule https://github.com/geonetwork/core-geonetwork/blob/main/schemas/iso19115-3.2018/src/main/plugin/iso19115-3.2018/formatter/dcat/dcat-core-distribution.xsl#L336-L339 and gives priority to transferOptions format if any and then fallback on distribution ones.
There was a problem hiding this comment.
Thanks a lot ! We did not know about it. Back to draft / analysis, ;-) !
iso19115-3.2018.che being based on iso19115-3.2018, encountered failures when working with dcat and iso19115-3.2018.che, wanted to share.
link to iso18115-3.2018.che sibling tests can be found in commits description.
Checklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation