2 years ago

#23502

test-img

Nil

Fuseki Named Graph persistence with inference

I am trying to persist multiple named graphs with inference in Fuseki.

I am referring to this excellent article, but facing some issues in Scenario 2: named graphs and no online updates.

My assembler configuration looks like this:

@prefix :        <#> .
@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

## ---------------------------------------------------------------
## Updatable TDB dataset with all services enabled.

:service_tdb_all rdf:type fuseki:Service ;
   rdfs:label                      "TDB onekg-metadata-dev" ;
   fuseki:name                        "onekg-metadata-dev" ;
   fuseki:serviceQuery                "" ;
   fuseki:serviceQuery                "sparql" ;
   fuseki:serviceQuery                "query" ;
   fuseki:serviceUpdate               "" ;
   fuseki:serviceUpdate               "update" ;
   fuseki:serviceUpload               "upload" ;
   fuseki:serviceReadWriteGraphStore  "data" ;
   fuseki:serviceReadGraphStore       "get" ;
   fuseki:dataset                      :dataset ;
   .


# Location of the TDB dataset
:tdb_dataset_readwrite
       a              tdb:DatasetTDB ;
       tdb:location  "reasoning-dir" ;
  .

# Inference dataset
:dataset a ja:RDFDataset ;
        ja:defaultGraph :model_inf .

# Inference Model
:model_inf a ja:InfModel ;
        ja:baseModel :graph ;
        ja:reasoner [
             ja:reasonerURL 
               <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
         ] .

# Intermediate graph referencing to the union graph
:graph rdf:type tdb:GraphTDB ;
         tdb:dataset :tdb_dataset_readwrite ;
 .

I am uploading some triples in a named graph and can query the triples(without inference) as is expected.

However, if I try to restart and try to query again, the named graph is missing and I can not query anything from there.

I would like to get some help here. Thank you in advance.

sparql

owl

jena

fuseki

0 Answers

Your Answer

Accepted video resources