Access VocBench3 history RDF data.

52 views
Skip to first unread message

Barry Nouwt

unread,
Apr 5, 2024, 4:14:59 AMApr 5
to vocbench-user
Hi all, 

I am exploring VocBenc3's history/validation capabilities. I think they can be very useful for our project. For this I want to access the PROV-O RDF data in the so called '*_support' graph of a VocBench3 project, but until now I did not succeed.

What I have already tried?
- Creating a local VocBench3 project with history and validation enabled and using the semanticturkey REST API to access the project's support repository which, if I understand correctly, should contain the PROV-O history RDF data. This was unsuccessful, because I can only SPARQL access the regular graph of the project and using the History API does not seem to give access to the RDF data.
- Installing a separate RDF4J server/workbench and instructing VocBench3 to create two repositories there. This way I could access the *_support repository through the RDF4J-workbench SPARQL interface. This failed because VocBench3 gives an error about "Supplied repository configuration is invalid: Unsupported Sail type: http://semanticturkey.uniroma2.it/sail/changetracker" when creating a project with history enabled. To remedied this I added the "st-changetracking-sail-11.4.2.jar" JAR to both the RDF4J and VocBench3 classpaths, but to no avail.

Can anyone help me out with getting access to the PROV-O data that VocBench3 generates based on changes to the knowledge graph?

Thanks in advance!

Barry

Roland Wingerter

unread,
Apr 6, 2024, 6:02:07 AMApr 6
to vocbench-user

Dear Barry,

I don’t use the RDF4J server, but GraphDB.

First of all, make sure to copy "st-changetracking-sail-11.4.2.jar” to the directory “..\system\it\uniroma2\art\semanticturkey\st-changetracking-sail\11.4.2” and the jar file called “st-trivial-inference-sail-11.4.2.jar” to the “..system/it/uniroma2/art/semanticturkey/st-trivial-inference-sail/11.4.2” directory of Semantic Turkey as described in the VB3 documentation as described in the VB3 documentation (https://vocbench.uniroma2.it/doc/sys/#separate_triple_store).

Here is what you can try with SPARQL in VocBench. The following query will give you the names of graphs in the repository and the number of triples:

SELECT DISTINCT ?g

(COUNT(*) AS ?count)

WHERE {

    GRAPH ?g

    {

        ?s ?p ?o .

    }

} GROUP BY ?g

If the repository has any pending changes you will see a graph called

http://semanticturkey.uniroma2.it/ns/validation#staging-add-graph/YOURBASEURI

Then you can query this graph from VocBench with a query like

SELECT *

WHERE {

    GRAPH <http://semanticturkey.uniroma2.it/ns/validation#staging-add-graph/YOURBASEURI> {

    ?s ?p ?o .

    }       

} ORDER BY ?s

LIMIT 10

Hope this helps.

Kind regards

Roland

Armando Stellato

unread,
Apr 6, 2024, 10:53:08 AMApr 6
to Roland Wingerter, vocbench-user

Dear Barry,

 

a little typo (guess he just confused while writing as he knows well :-) ) that might have been written by Roland:

 

the sails do not need to be copied to those folders he mentioned. They are located in those folders and need to be copied  into the “lib” directory of the triplestore (GraphDB or RDF4J is the same, as GraphDB is simply adopting the sail architecture of RDF4J). In any case, as a reference, the page he mentioned is correctly written.

 

This should work. Putting them on the classpath was, in general, not a bad idea, but RDF4J might be using a separate class loader bound to the lib directory for sail plugins; that’s why, possibly, they were still not available in your tests.

 

So, this will allow you to check the support repo directly from the UI of the external triple store.

 

At the moment, the support repo is not queriable directly by VocBench (we kind-of hid it, to avoid users messing up with that data that would be very sensible to corruption) however, the possibility to at least query it is on a stack of possible evolutions for the next roadmaps. I filed your email with a +1 on that feature ;-)

 

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/8c39ff9c-6e0e-41cc-97e5-24039cf8f08en%40googlegroups.com.

Message has been deleted

Armando Stellato

unread,
Apr 10, 2024, 5:30:48 AMApr 10
to Barry Nouwt, vocbench-user

Thanks a lot Barry for sending us your feedback on the solution, that helps others on the discussion group to figure out possible solutions when they have similar issues!

Kind Regards,

Armando

 

From: 'Barry Nouwt' via vocbench-user <vocben...@googlegroups.com>
Sent: Monday, April 8, 2024 11:55 AM
To: vocbench-user <vocben...@googlegroups.com>
Subject: Re: [vocbench-user] Re: Access VocBench3 history RDF data.

 

Thanks for the pointers. I can now access the PROV-O history data. 

 

I was using the eclipse/rdf4j-workbench docker image to run the rdf4j-server, which uses tomcat. After adding 'st-changetracking-sail-11.4.2.jar' to the /usr/local/tomcat/webapps/rdf4j-server/WEB-INF/lib/ folder of the rdf4j-server (which required me to unzip the rdf4j-server.war at docker build time, instead of letting tomcat do it on startup), I can create a project with history support in VocBench3 with a remote repository at the rdf4j-server. Then I have indeed access to the 'support' repository and can look at the versioning data generated by VocBench3.

Reply all
Reply to author
Forward
0 new messages