You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Jérémie Doucy <jd...@gmail.com> on 2012/02/02 19:44:43 UTC

Fuseki / TDB / Inference.

Hi all,
I'm trying to configure Fuseki to use TDB and inference. I already found
some post about it in this mailing list but no real solution to my issue.
Here is what I'm trying to do :
- use TDB to store triples managed by SPARQL 1.1 update / delete queries
- activate inference on this triples using my own Ontology (OWL inference)
when I request the endpoint using SPARQL 1.1 standard "select / ask" queries

I tried with 2 services in Fuseki:
- one directly linked to TDB for updates (#service2)
- one on an inferred model plugged with my ontology and the TDB graph
(#service1)
here is my config file:

## ---------------------------------------------------------------
<#service1> rdf:type fuseki:Service ;
    fuseki:name                       "infer" ;       # http://host:port
/infer
    fuseki:serviceQuery               "query" ;    # SPARQL query service
#    fuseki:serviceUpdate              "update" ;   # SPARQL query service
    fuseki:dataset                   <#graph-infer> ;
    .

<#service2> rdf:type fuseki:Service ;
    fuseki:name                       "noinfer" ;       # http://host:port
/noinfer
#    fuseki:serviceQuery               "query" ;    # SPARQL query service
    fuseki:serviceUpdate              "update" ;   # SPARQL query service
    fuseki:dataset                   <#dataset> ;
    .

## Initialize TDB.

[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .

<#graph-infer>
      a ja:RDFDataset;
      ja:defaultGraph [
          a ja:InfModel;
          ja:reasoner [ja:reasonerURL<
http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>;
      ja:schema <#owl>];
         ja:baseModel <#graph>
      ];
   .
## ---- A whole dataset managed by TDB
<#dataset> rdf:type tdb:DatasetTDB ;
    tdb:location "data/triplestore/TDB" ;
.

<#graph> rdf:type tdb:GraphTDB ;
   tdb:dataset <#dataset> ;
.

<#owl> rdf:type ja:MemoryModel;
ja:content [ja:externalContent <file:////pass to my owl file> ] ;
rdfs:label "Ontology" .

Here is my issue, when I add new triples, the select take into account this
triples and the new one inferred. But when I delete some triples, they are
still present when I request the inferred endpoint. Is it normal ?
I think there is some issues in the datasets synchronization ?

Thanks in advance.

Jérémie

PS : I'm using Fuseki 0.2.1-incubating-SNAPSHOT 2012-02-02T05:06:01+0000