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

Formatters / DCAT-AP / Allow PO URI to be used for constraints. #8507

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

fxprunayre
Copy link
Member

In DCAT-AP, the Publication Office vocabulary is used for license and the mapping was expecting ISO to encode original URI (eg. http://creativecommons.org/licenses/by/4.0/) and not PO ones (eg. http://publications.europa.eu/resource/authority/licence/CC_BY_4_0). So ISO record using PO URI was not returning the licence in DCAT-AP (and was in DCAT - because all licence URI are allowed).

The vocabulary is encoded with the following and skos:exactMatch was used for the mapping:

   <skos:Concept rdf:about="http://publications.europa.eu/resource/authority/licence/CC_BY_4_0"
                 at:deprecated="false">
...
      <skos:exactMatch rdf:resource="http://creativecommons.org/licenses/by/4.0/"/>

Adding also rdf:about to allow PO URI to be used in ISO record.

Eg. if

         <mri:resourceConstraints>
            <mco:MD_LegalConstraints>
               <mco:useConstraints>
                  <mco:MD_RestrictionCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#MD_RestrictionCode"
                                          codeListValue="otherRestrictions"/>
               </mco:useConstraints>
               <mco:otherConstraints>
                  <gcx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply">No conditions apply to access and use.</gcx:Anchor>
               </mco:otherConstraints>
            </mco:MD_LegalConstraints>
         </mri:resourceConstraints>
         <mri:resourceConstraints>
            <mco:MD_LegalConstraints>
               <mco:useConstraints>
                  <mco:MD_RestrictionCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#MD_RestrictionCode"
                                          codeListValue="license"/>
               </mco:useConstraints>
               <mco:otherConstraints>
                  <gcx:Anchor xlink:href="http://publications.europa.eu/resource/authority/licence/BSL_1_0">BSL</gcx:Anchor>
               </mco:otherConstraints>
               <mco:otherConstraints>
                  <gcx:Anchor xlink:href="http://creativecommons.org/licenses/by/4.0/">Ces données sont disponibles sous licence CC-BY 4.0 (original).</gcx:Anchor>
               </mco:otherConstraints>
            </mco:MD_LegalConstraints>
         </mri:resourceConstraints>

DCAT (preserve all URI)

<dct:license>
<dct:LicenseDocument rdf:about="http://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply"/>
</dct:license>
<dct:license>
<dct:LicenseDocument rdf:about="http://publications.europa.eu/resource/authority/licence/BSL_1_0"/>
</dct:license>
<dct:license>
<dct:LicenseDocument rdf:about="http://creativecommons.org/licenses/by/4.0/"/>

DCAT-AP (only allow PO URI)

<dct:accessRights>
<dct:RightsStatement rdf:about="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"/>
</dct:accessRights>
<dct:license>
<dct:LicenseDocument rdf:about="http://publications.europa.eu/resource/authority/licence/BSL_1_0"/>
</dct:license>
<dct:license>
<dct:LicenseDocument rdf:about="http://publications.europa.eu/resource/authority/licence/CC_BY_4_0"/>

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

Funded by Service Public de Wallonie

In DCAT-AP, the Publication Office vocabulary is used for license and the mapping was expecting ISO to encode original URI (eg. http://creativecommons.org/licenses/by/4.0/) and not PO ones (eg. http://publications.europa.eu/resource/authority/licence/CC_BY_4_0). So ISO record using PO URI was not returning the licence in DCAT-AP (and was in DCAT - because all licence URI are allowed).

The vocabulary is encoded with the following and `skos:exactMatch` was used for the mapping:
```xml

   <skos:Concept rdf:about="http://publications.europa.eu/resource/authority/licence/CC_BY_4_0"
                 at:deprecated="false">
...
      <skos:exactMatch rdf:resource="http://creativecommons.org/licenses/by/4.0/"/>
```

Adding also `rdf:about` to allow PO URI to be used in ISO record.

Eg. if
```xml
         <mri:resourceConstraints>
            <mco:MD_LegalConstraints>
               <mco:useConstraints>
                  <mco:MD_RestrictionCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#MD_RestrictionCode"
                                          codeListValue="otherRestrictions"/>
               </mco:useConstraints>
               <mco:otherConstraints>
                  <gcx:Anchor xlink:href="http://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply">No conditions apply to access and use.</gcx:Anchor>
               </mco:otherConstraints>
            </mco:MD_LegalConstraints>
         </mri:resourceConstraints>
         <mri:resourceConstraints>
            <mco:MD_LegalConstraints>
               <mco:useConstraints>
                  <mco:MD_RestrictionCode codeList="http://standards.iso.org/iso/19115/resources/Codelists/cat/codelists.xml#MD_RestrictionCode"
                                          codeListValue="license"/>
               </mco:useConstraints>
               <mco:otherConstraints>
                  <gcx:Anchor xlink:href="http://publications.europa.eu/resource/authority/licence/BSL_1_0">BSL</gcx:Anchor>
               </mco:otherConstraints>
               <mco:otherConstraints>
                  <gcx:Anchor xlink:href="http://creativecommons.org/licenses/by/4.0/">Ces données sont disponibles sous licence CC-BY 4.0 (original).</gcx:Anchor>
               </mco:otherConstraints>
            </mco:MD_LegalConstraints>
         </mri:resourceConstraints>
```

DCAT (preserve all URI)
```xml
<dct:license>
<dct:LicenseDocument rdf:about="http://inspire.ec.europa.eu/metadata-codelist/ConditionsApplyingToAccessAndUse/noConditionsApply"/>
</dct:license>
<dct:license>
<dct:LicenseDocument rdf:about="http://publications.europa.eu/resource/authority/licence/BSL_1_0"/>
</dct:license>
<dct:license>
<dct:LicenseDocument rdf:about="http://creativecommons.org/licenses/by/4.0/"/>
```

DCAT-AP (only allow PO URI)
```xml

<dct:accessRights>
<dct:RightsStatement rdf:about="http://inspire.ec.europa.eu/metadata-codelist/LimitationsOnPublicAccess/noLimitations"/>
</dct:accessRights>
<dct:license>
<dct:LicenseDocument rdf:about="http://publications.europa.eu/resource/authority/licence/BSL_1_0"/>
</dct:license>
<dct:license>
<dct:LicenseDocument rdf:about="http://publications.europa.eu/resource/authority/licence/CC_BY_4_0"/>
```
@fxprunayre fxprunayre added this to the 4.4.7 milestone Nov 21, 2024
@fxprunayre fxprunayre requested a review from GeryNi November 21, 2024 09:23
Copy link

sonarcloud bot commented Nov 21, 2024

Copy link
Collaborator

@GeryNi GeryNi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good !

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@fxprunayre fxprunayre merged commit c2b4558 into main Dec 10, 2024
9 of 10 checks passed
@fxprunayre fxprunayre deleted the 446-dcat-ap-po-uri branch December 10, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants