opendatateam / udata

Customizable and skinnable social platform dedicated to open data.
http://udata.readthedocs.org
GNU Affero General Public License v3.0
238 stars 87 forks source link

Fetch dct:accessRights from proper locations #3054

Open streino opened 2 months ago

streino commented 2 months ago

Access rights can be a property of Resource (super-class of Dataset) or Distribution.

Some conditions apply :

Information about licenses and rights SHOULD be provided on the level of Distribution.
Information about licenses and rights MAY be provided for a Dataset in addition to but
not instead of the information provided for the Distributions of that Dataset. Providing
license or rights information for a Dataset that is different from information provided
for a Distribution of that Dataset SHOULD be avoided as this can create legal conflicts.

Also, in the case of DCAT resources coming from the SEMICeu transformation, if I'm not mistaken, the rights are taken at the dataset level from the ISO input and copied at the distribution level in the DCAT output. So we should be able to assume that what we find at the distribution level is in fact applying to the entire record.

Since udata doesn't display distribution-level rights, we'll have to approximate at the dataset-level. It's probably better to be overly careful than miss some restrictions. So we could go with :

The other approach would be to store all information in the extras as-is and retrieve what we're interested in displaying when needed.

Finally, the same sort of logic should apply to license, but that part needs to be articulated with existing license logic in udata. So probably another PR.

ThibaudDauce commented 2 months ago

Why not put accesRight information inside Resource extras directly?

streino commented 1 month ago

Why not put accesRight information inside Resource extras directly?

Right. I used what was already there, but it makes sense to move it outside of the harvest section into resource and/or dataset extras directly (depending on the implementation we go with).

maudetes commented 1 month ago

The other approach would be to store all information in the extras as-is and retrieve what we're interested in displaying when needed.

I would rather store the information as-is for now instead of consolidating it at the dataset level.

streino commented 1 month ago

I would rather store the information as-is for now instead of consolidating it at the dataset level.

We (ping @alhyss) were leaning the other way for the following reasons:

That said, if there are plans to use distribution-level licence/access-rights in udata :

alhyss commented 1 month ago

I would rather store the information as-is for now instead of consolidating it at the dataset level.

I agree that distinct distribution-level rights and licenses should be stored as they are. If these properties are not the same for all distributions, this is the only way to prevent losing an important information. Legal conditions are meaningless (and confusing) if users can't tell which distribution they're applicable to.

That being said:

Using only distribution-level properties is arguably simpler, but wouldn't be very efficient.

Ideally, you could allow both dataset and distribution level properties, though not together:

If all distributions have the same access rights property but not the same license, a dataset-level property would be used for access rights and distribution-level properties for the licenses.

Finding a way to display the distribution-level properties doesn't seem urgent at all, considering this case might never happen. But when it does, we'll be able to detect it and decide how to show it.

streino commented 1 month ago

@maudetes, we rediscussed the topic with @alhyss so I'm go with her suggestion above. Ok on your side?

maudetes commented 1 month ago

Thank you for the detailed explanation of the different considerations. This seems like the best approach to cover the main usages as well as possible tricky ones. :+1: I think we can also iterate quite easily on this if needed since these are extras properties.