Property Features at Virtuoso

I work with Jena and Virtuoso to host some RDF data. I plan to have Jena as an interface and Virtuoso as a backend repository, since Jena seems to be easier to expand, and Virtuoso has some nice features like converting relational data to RDF. My problem is that the properties of the properties that are in Yen (described here ) and those that I want to implement do not seem to have an effect when the virtuoso is used as the main repository.

An example query that uses TDB (TDBFactory.createDataset) to create a dataset but does not work when using Virtuoso (VirtGraph, VirtDataset, and also tried QueryExecutionFactory.sparqlService):

PREFIX  apf:  <java:com.hp.hpl.jena.sparql.pfunction.library.>
SELECT  *
WHERE
    { ?s apf:str "Test" }
LIMIT   5

I am looking for a way to make Jena / ARQ before or after processing the results of a query sent by Virtuoso.

If this is not possible, indicate other directions. Implementing a property function in Virtuoso or using Sesame or another easily extensible system instead is my own initial thoughts.

+4
source share
2 answers

If you need Jena functionality, you can send a Virtuoso request and return the graph, and then run the query locally on that graph. Otherwise, you need functions on the server, not on the client.

(The function is apf:strbest done at the present time as FILTERor BINDand STR())

0
source

, Virtuoso, . :

Model m = VirtModel.openDatabaseModel(...);
Query query = QueryFactory.create(
    "PREFIX  apf:  <java:com.hp.hpl.jena.sparql.pfunction.library.> "+
    "SELECT  * WHERE { ?s apf:str "Test" } LIMIT   5") ;

QueryExecution qexec = com.hp.hpl.jena.query.QueryExecutionFactory.create(query, m) ;
ResultSet rs = qexec.execSelect() ;

Jena ARQ ( , Virtuoso API VirtosoGraph). , , ARQ.

0

Source: https://habr.com/ru/post/1530442/


All Articles