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

HVD reporting query 6 does not cover data service legal information attached to Distributions #401

Open
jakubklimek opened this issue Nov 18, 2024 · 0 comments

Comments

@jakubklimek
Copy link
Contributor

I have noticed that legal information (access rights, licences, rights) of HVD data services is taken only from the instances of dcat:DataService and not from the instances of dcat:Distribution in Reporting query 6 - service legal information.

This is OK for "standalone" data services or services connected to datasets using dcat:servesDataset, not using distributions.
It is not OK for the data services connected to datasets through distributions. In that case, consistently with bulk download distributions, the legal information is attached to the Distribution, connecting to the data service using dcat:accessService. This service may serve multiple datasets, each with different legal information, distinguished by the distribution.

At least this is my take on it, and it is implemented like this in several data portals including the Czech and Slovak ones.

In DCAT-AP-HVD Legal information section, under the diagram, it says:

In the reporting requirements of the HVD IR, the notion terms of use is used. It has been agreed, by the Working Group for DCAT-AP HVD, that providing terms of use information is the same as providing legal information for a Data Service.

However, this is not related to where technically to get that information for a data service, and therefore I still think the case where we have the service connected via a distribution should be supported. I.e.:

:ds a dcat:Dataset ;
  dcat:distribution :distro.
:distro a dcat:Distribution ;
  dcterms:licence <http://publications.europa.eu/resource/authority/licence/CC_BY_4_0> ; #or something mapped to the NAL
  dcat:accessService :service .
:service a dcat:DataService ;
  dcat:endpointURL :api .

We do not want to duplicate the legal information from distribution to data service, as this could create a conflict when the service serves multiple datasets under different conditions.

Current query 6 not taking this into account:

prefix dct: <http://purl.org/dc/terms/> 
prefix r5r: <http://data.europa.eu/r5r/>
prefix dcat:  <http://www.w3.org/ns/dcat#>

select distinct ?d ?api ?title ?lic ?rights where { 
<?MSCat?> ?cp ?d. 
?d r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
{
?d dcat:distribution ?dist.
?dist r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.

?dist dcat:accessService ?api.
?api r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
} 
union {
?api dcat:servesDataset ?d.
?api r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
}

optional { ?api dct:title ?title.
     FILTER ( langMatches( lang(?title),  "en" ))
 } 
OPTIONAL { ?api dct:license ?lic. } 
OPTIONAL { ?api dct:rights  ?rights. }

} 

Of course adding the Distribution legal information to the query would raise the question about what to do when there would be conflicting information on Distribution and Data Service, similarly to when there is conflicting information on Distribution and Dataset. But, as in the case of Dataset, this can be discouraged and left to the publisher to resolve.

This would be the query for taking the legal information of a data service from the distributions:

prefix dct: <http://purl.org/dc/terms/> 
prefix r5r: <http://data.europa.eu/r5r/>
prefix dcat:  <http://www.w3.org/ns/dcat#>

select distinct ?d ?api ?title ?lic ?rights where { 
  <?MSCat?> ?cp ?d. 
  ?d r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
  {
    ?d dcat:distribution ?dist.
    ?dist r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.

    ?dist dcat:accessService ?api.
    ?api r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
    OPTIONAL { ?dist dct:license ?lic. } 
    OPTIONAL { ?dist dct:rights  ?rights. }

  } 
  union {
    ?api dcat:servesDataset ?d.
    ?api r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
  }

  OPTIONAL { ?api dct:title ?title.
    FILTER ( langMatches( lang(?title),  "en" ))
  } 
} 

Or, combined with the original query 6:

PREFIX dct: <http://purl.org/dc/terms/> 
PREFIX r5r: <http://data.europa.eu/r5r/>
PREFIX dcat:  <http://www.w3.org/ns/dcat#>

SELECT DISTINCT ?d ?api ?title ?lic ?rights where { 
  <https://data.gov.cz/zdroj/katalog/NKOD> ?cp ?d. 
  ?d r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
  {
    ?d dcat:distribution ?dist.
    ?dist r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.

    ?dist dcat:accessService ?api.
    ?api r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
    
    OPTIONAL { ?dist dct:license ?lic. } 
    OPTIONAL { ?dist dct:rights  ?rights. }
  } 
  UNION {
    ?api dcat:servesDataset ?d.
    ?api r5r:applicableLegislation <http://data.europa.eu/eli/reg_impl/2023/138/oj>.
    
    OPTIONAL { ?api dct:license ?lic. } 
    OPTIONAL { ?api dct:rights  ?rights. }
  }
  OPTIONAL { ?api dct:title ?title.
    FILTER ( langMatches( lang(?title),  "en" ))
  } 
} 
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

No branches or pull requests

1 participant