Setting the project namespace & base uri

38 views
Skip to first unread message

Joeli Takala

unread,
Oct 18, 2023, 5:05:05 AM10/18/23
to vocbench-user
Dear VocBench team,

I was wondering if it could be possible for me to use URIs in the form provided by the National Library of Finland's URN resolver, which follow the pattern http://urn.fi/URN:NBN:fi:au:vocab:id . Now, I know this is a bit unconventional, but it is a valid URI that works with SPARQL and GraphDB. It is not accepted byt the VB user interface, at least not as the base URI in the project generation - but I am more than willing to work around it.

Should I expect problems when I:
- Write just something for the base URI in the project generation dialogue
- Amend the base URI  for the project to http://urn.fi/URN:NBN:fi:au:vocab: in project.info
- Amend the default namespace to http://urn.fi/URN:NBN:fi:au:vocab: in project.info
- Insert a triple into graph http://urn.fi/URN:NBN:fi:au:vocab: in GraphDB (as rdf4j does not simply understand SPARQL CREATE GRAPH <uri> command, since it's without triple data)
- Restart VocBench

It seems to work this way without error messages in the log or in the GUI... The only difference is that while the creation dialogue for a new concept within the project does understand http://urn.fi/URN:NBN:fi:au:vocab: as the namespace for a new concept, the concept view parses this as http://urn.fi/ being the namespace and URN:NBN:fi:au:vocab:id as the local name. But I think this minor confusion is the lesser evil here.

Is amending the project base URI and the default namespace after the project creation a bad idea in general - or should I try some other way, for example creating the project directly throut VocBench API? Come to think about it, that would be an awesome way to manage several vocabularies if I could upload the data AND the project/user settings with scripts instead of GUI.

And sorry for missing answers to my questions here earlier this year, I have been working on VB very sporadically.


_______
Joeli

Joeli Takala

unread,
Oct 23, 2023, 6:33:44 AM10/23/23
to vocbench-user
I can report that this results in odd behaviour with the VB search component when searching for the local name of the URI in the search is one of the standard configurations of the search. 

When the URI is something like http://urn.fi/URN:NBN:fi:au:vocab:m138 and the "Search in local name" is selected (as it always is):
- I cannot search for the URI with "Starts with" (α..) search, which is understandable but unfortunate
- "Contains" (.α.) search returns several results, which is fair enough
- "Ends with" (..α) search works perfectly :)
- I cannot search it with "Exact" (α) search, which is understandable but unfortunate
- I cannot search if with "Fuzzy" (~α) which is just weird

This could create situation where the user belives the resource does not exist for the vocabulary. This could be mitigated for the user for example if they don't get the habit of searching fo URI's at all in this case - if they they know the URI exists, they could be instructed to just open the resource in a new tab and pasting the URI to the text field and thus bypassing the search. But can I exclude the local name from the search configuration by default so that it doesn't get selected every time the user logs in?


_______
Joeli

Armando Stellato

unread,
Jun 21, 2024, 11:59:17 AMJun 21
to Joeli Takala, vocbench-user

Dear Joeli,

 

apologies for this very late answer. For some mysterious reason this msg has been overlooked.

 

I just tried with VB 12.1 and actually the pattern is accepted. Out of curiosity, I tried the same pattern on 11.4.2 and indeed there is a problem there. This is only in the client and not in the server.

Tiziano just found out that there has been a fix in February, addressing a few issues in covering IRIs and not just URIs, and this fix covered also your case.

 

So, if you move to 12.1 (in case you didn’t’ still) this problem is fixed.

 

Kind Regards,

 

Armando

 

--
You received this message because you are subscribed to the Google Groups "vocbench-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vocbench-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vocbench-user/e0af1081-a088-4ff4-abe1-b608029a8939n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages