How to upload URI as an URL of a website

27 views
Skip to first unread message

Jeroen Heijning

unread,
May 24, 2021, 5:06:27 AM5/24/21
to vocbench-user

Hello ,

I am using CyberBorean and Eclipse RDF to insert triples as a bundle for one subject, corresponding to a record in a relational database, using Java.

Cyberboreans allows you to insert Strings and URI’s.

Some of the URI’s refer to other subjects in the same VocBench register and these work fine, but other URI contain a link to an external website, like https://wetten.overheid.nl/BWBR0041292/2018-09-15.

Within VocBench these appear with a globe and the values in sparql are displayed as <https://wetten.overheid.nl/BWBR0041292/2018-09-15>

What we prefer to see is “https://wetten.overheid.nl/BWBR0041292/2018-09-15”ˆˆxsd:anyURI.

In the last case the link in the data-view is displayed with a grey circle, instead of a globe. This link is clickable and will open the page on the other website.

While the first version will spin and eventually show an error in the VocBench frontend.

So the issue is whether one can make a  difference between sending an URI I-object which is the subject of another set of triples from sending an URI that links to a URL as a link to an article on a website?

How can I ensure that the external links will be stored as “https://wetten.overheid.nl/BWBR0041292/2018-09-15”ˆˆxsd:anyURI  ? 

Is there a way to configure the differences in VocBench between these URI objects?

(Note: in order for our processing to work we had to add a little bit of java code to extend the SPARQLProtocolSession and SPARQLRepository from eclipse pdf in order to setup a connection to our VocBench repositories, which means I am restricted to sending either URI’s or Strings by Cyberborean ((https://rdfbeans.github.io/index.html) .  The String option does not work, because the predicate in the VocBench register is defined as URI.

Kind regards,

Jeroen

Armando Stellato

unread,
May 25, 2021, 5:10:18 AM5/25/21
to Jeroen Heijning, vocbench-user

Dear Jeroen,

 

what you are mentioning is not a preference of visualization, rather a matter of representation and, specifically, of the nature of the resources being represented.

 

Besides technical issues you might have with CyberBorean (sorry, I know it’s a sort of ORM for RDF, but I’m not familiar with it), the thing is:

 

What you see as a <https://wetten.overheid.nl/BWBR0041292/2018-09-15> is a URI in RDF4J (I use the RDF4J jargon, which in the end is also the RDF specs one, since CyberBorean is based on it and you should be familiar with it). You see the “world” icon in VocBench, as that icon is associated with resources that are not declared within the data present in the VocBench project and thus, in perfect linked data style, their definition should be “somewhere out there, in the web”. That’s why when u try to click on them, you see the spin and then the error: VocBench is trying to resolve them on the Web, looking for RDF content, which however is not present because they are just links to traditional web pages.

 

What you see as https://wetten.overheid.nl/BWBR0041292/2018-09-15”ˆˆxsd:anyURI  is instead a literal (class “Literal” in RDF4J) for which the lexical form is “https://wetten.overheid.nl/BWBR0041292/2018-09-15” and the datatype is xsd:anyURI.

 

Not sure how CyberBorean works, but if you are using RDf4J api, you can use a ValueFactory [1] and create instance of either the URI class [2,3] or the Literal one [4], specifying the lexical form and the datatype. For this latter, note that you can use the XSD class contained in the vocabulary package in order to retrieve a reference to the anyURI datatype [5] without creating it from scratch

 

Kind Regards,

 

Armando

 

[1] https://rdf4j.org/javadoc/latest/index.html?org/eclipse/rdf4j/model/ValueFactory.html

[2] https://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/model/ValueFactory.html#createIRI-java.lang.String-

[3] https://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/model/ValueFactory.html#createIRI-java.lang.String-java.lang.String-

[4] https://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/model/ValueFactory.html#createLiteral-java.lang.String-org.eclipse.rdf4j.model.IRI-

[5] https://rdf4j.org/javadoc/latest/org/eclipse/rdf4j/model/vocabulary/XSD.html#ANYURI

--
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/058bf14a-84b2-4ff0-811a-0244f3f51e34n%40googlegroups.com.

Jeroen Heijning

unread,
May 25, 2021, 11:40:56 AM5/25/21
to vocbench-user

Hi Armando,

Thanks for your reply. Eclipse RDF is indeed using the ValueFactory and that is where the problem lies.
If the Object is an URI it will call IRI createIRI(String namespace, String localName) and this will always translate the String to <...>

However in sparl it is perfectly possible to insert something as: https://wetten.overheid.nl/BWBR0041292/2018-09-15"^^<http://www.w3.org/2001/XMLSchema#anyURI
I have the same issue when using an in memory Triple store, such as the SailRepository.
This means my issue is not specifically related to VocBench, but to Eclipse RDF.

Kind Regards,

Jeroen
Op dinsdag 25 mei 2021 om 11:10:18 UTC+2 schreef stel...@uniroma2.it:
Reply all
Reply to author
Forward
0 new messages