Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Jena reasoner on Neo4J db

it's my first time writing here but i'm really struck with a problem: is it possible to use the Jena reasoner on a No-SQL database, like Neo4J, already filled with data?

I've a Neo4J's graph rappresenting a bunch of triples and I would like to use the Jena API and the Jena reasoner on them. I thought about using the SDB/TDB component of Jena but I don't get how to actually load the data into my model since the SDB component seems to work with just SQL databases and the go throught the whole TDB javadoc seems to be a bit too much. Should I define some kind of configuration file for the TDB model too ?

Thanks very much for the help.

like image 264
Ancelot182 Avatar asked Apr 08 '14 10:04

Ancelot182


1 Answers

You should have a look at this link which describes the connection between neo4j and triplestores. Or possible connections at least.

The neo4j model is very different than the RDF model, which Jena uses. RDF is composed of triples, meaning subjects, predicates, and objects. Here is an example of a graph composed of triples. Note the use of URIs for identifying resources, and note that the nodes are typically atomic data values. They're a URI, a simple number, a string, and so on.

In Neo4j, nodes are "Property Containers". Meaning that they're not just URIs, but they're actually bundles of information. Relationships connect nodes. So RDF "predicates" are sort of like Neo4j relationships, but neo4j nodes are not like RDF resources and literals.

Your main task if you want to use reasoners over a neo4j database is going to be to suck data out of neo4j, and format it as a set of RDF triples. You can then put those RDF triples into a Jena Model. When you have that jena model in memory, you can use existing jena APIs to use reasoners with that model.

like image 94
FrobberOfBits Avatar answered Nov 19 '22 20:11

FrobberOfBits