italia / daf-ontologie-vocabolari-controllati

Elenco di ontologie e vocabolari controllati. Per maggiori informazioni, si veda il readme principale e quello di singoli vocabolari/ontologie, ove presente, e la seguente documentazione
https://github.com/italia/daf-ontologie-vocabolari-controllati/wiki
Creative Commons Attribution 4.0 International
80 stars 52 forks source link

Identifier containing a space in transparency-obligation-organization #172

Closed ioggstream closed 1 year ago

ioggstream commented 2 years ago

Question

@giorgialodi is this correct? https://github.com/italia/daf-ontologie-vocabolari-controllati/blob/f58478950109bcfeb712bd274618fed685e6faaf/VocabolariControllati/classifications-for-transparency/transparency-obligation/transparency-obligation-organization.ttl#L380

The identifier is 040102%20040201 -> the URL contains a space

Issue related to

[ (ioggstream-125) rpolli@rpolli daf-ontologie-vocabolari-controllati]$ frictionless validate VocabolariControllati/classifications-for-transparency/transparency-obligation/transparency-obligation-administration.csv 
# -------
# invalid: VocabolariControllati/classifications-for-transparency/transparency-obligation/transparency-obligation-administration.csv
# -------

====  =====  ==========  ======================================================================================================================
row   field  code        message                                                                                                               
====  =====  ==========  ======================================================================================================================
1379      1  type-error  Type error in the cell "040102 040201" in row "1379" and field "id_obbligo" at position "1": type is "integer/default"
1476      1  type-error  Type error in the cell "040102 040201" in row "1476" and field "id_obbligo" at position "1": type is "integer/default"
1573      1  type-error  Type error in the cell "040102 040201" in row "1573" and field "id_obbligo" at position "1": type is "integer/default"
1670      1  type-error  Type error in the cell "040102 040201" in row "1670" and field "id_obbligo" at position "1": type is "integer/default"
1767      1  type-error  Type error in the cell "040102 040201" in row "1767" and field "id_obbligo" at position "1": type is "integer/default"
1864      1  type-error  Type error in the cell "040102 040201" in row "1864" and field "id_obbligo" at position "1": type is "integer/default"
giorgialodi commented 2 years ago

I think it is like that when it is generated automatically from some fields containing spaces. This RDF file was generated probably automatically from some tables and in one case the code in the table had a space ( I am guessing, I did not create personally this RDF file). When this happens, in the URI the space is replaced with % by some automatic systems. It is not a bug/error. Obviously, if you refer to that URI you have to include %. I do not like that much to be honest, but change a URI is a critical operation. I would leave it as it is.

ioggstream commented 2 years ago

I tracked down 040102 040201 to transparency obligation... it seems that there only exists the 040102 identifier.

Can we check/ask whether the correct value is 040102?

ioggstream commented 2 years ago

iiuc URLs cannot contain %20 in the path segment.

ioggstream commented 2 years ago

@giorgialodi URLs cannot include %20 nor blank in a path segment. The blank/%20 terminates the URI and the following part is ignored. This must be fixed

giorgialodi commented 2 years ago

Sorry @ioggstream but when there is a space and the URI is automatically generated the space is encoded with %20 because space is not admitted in URIs. So there is an encoding of the space that is added. As I said above, this is possible. I do not like very much but you are changing a persistent URIs, which is a critical operation to avoid as much as possible. The problem that I think is the most relevant one is that the identifier contains two values instead one only. I have to check this before proceeding with this critical modification.

ioggstream commented 2 years ago

@giorgialodi ok, so pls check if that's the correct URI since I am quite sure that this value is a typo :)

giorgialodi commented 1 year ago

@bfabio @mfortini @Clou-dia la questione dell'URI sballato è stata risolta quando sono state apportate le modifiche al vocabolario. Io chiuderei l'issue.