molgenis / molgenis-emx2

MOLGENIS EMX2, the latest version of the MOLGENIS data platform.
GNU Lesser General Public License v3.0
14 stars 18 forks source link

fix(rdf): Email addresses should be IRIs, not literals #4226

Open svandenhoek opened 1 month ago

svandenhoek commented 1 month ago

What version of EMX2 are you using (see footer) v11.5.0-SNAPSHOT

Describe the bug RDF outputs email addresses as literals ("bob@example.com"). These should be IRIs:

<mailto:bob@example.com>

https://www.w3.org/TR/rdf12-turtle/#example-16

The email address as a mailto URI

https://www.w3.org/TR/vcard-rdf/#Communications_Properties

Telephone numbers and e-mails as literals In RDF, telephone numbers and e-mails have their own IRI schemes tel:+420123456789 and mailto:a@b.cz - therefore, they are resources (rdfs:Resource), not literals.

https://jakub.klímek.com/nprg036-hw2#telephone-numbers-and-e-mails-as-literals (seems to be a personal website from a teacher that teaches at https://www.ksi.mff.cuni.cz/ in prague)

Expected behavior Email addresses are defined as: <mailto:bob@example.com>

svandenhoek commented 1 month ago

Our SHACL validation for Health-RI requires this as well: https://github.com/molgenis/molgenis-emx2/blob/5eb72c52ccacd6fbca835e413ccb719e102503a4/backend/molgenis-emx2-rdf/src/test/resources/SHACL/Health-RI_core_plateau_1/v1.0.0/Dataset.ttl#L154-L156