Allow to update the case of the URIs

Created on 17 February 2025, about 2 months ago

Problem/Motivation

In our project, I had a case where I wanted to update the case of the URI because I was importing a concept from an updated version of an ontology and needed to update the IRI because I wanted the latest version of the URI to be shown in the UI.

We had some internal discussion and the points we discussed were:
* Make the SQL column `rdf_sync_uri`.`uri` case sensitive: This was decided not to go with it because it is against the RFC standards. According to https://stackoverflow.com/questions/15641694/are-uris-case-insensitive, RFC3986 and RFC7230 are suggesting that the scheme and the base path are case insensitive, and RFC2616 suggests that the whole URI must be sensitive. However, in https://afs.github.io/rdf-iri-syntax.html#defn-uri-syntax, the IRI syntax does not declare explicitly the way case is handled, but is referring to the first 2 RFC above (Note that Drupal handles their routing system as insensitive). Thus, in order to be compliant, we would have to tamper with the URIs in order to store them as lowercase for example in their base, and leave the rest of the URI untouched. That would still result in an altered URI.
* Split the columns either to "base URI" and "query", or "cleanUri" and "Uri" and have the corresponding column be case sensitive while leaving the other one as case insensitive. That is better, but would still result in having cases where the same term is deleted and recreated. For example, my case is that I am importing a list of terms from a file which is a newer version of the one that I had the previous version of terms created. Some of the terms, have had their URI altered. These terms are low in number, and could be done manually, but the result I would have to do it every single time and maybe some time, the number of terms are not that high. So my example is 2 URLs, let's say https://example.com/Someviewpoint and the new URL is https://example.com/SomeViewpoint. I do not want to lose the current data, just to update the URI. And I do not want to just update the term without having the URI changed because I show it in the UI.

Thus, the proposal is to
* leave the comparison as case insensitive
* alter the field item list, to also perform an update of the URI if the only changes are case sensitive characters.
* Update the readme file.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇬🇷Greece idimopoulos

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024