Can I configure Jena Fuseki with inference and TDB?

对着背影说爱祢 提交于 2019-12-08 00:37:06

问题


I want to configure Fuseki with an inference model supported by TDB.

I have been able to configure it with a Memory Model, but not with a TDB Model where I could update triples.

I am using the following assembler description:

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

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

<#dataset> rdf:type ja:RDFDataset ;
       ja:defaultGraph <#infModel> .

<#infModel> a ja:InfModel ;
     ja:baseModel <#tdbGraph>; 
     ja:reasoner 
          [ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>].

<#tdbGraph> rdf:type tdb:GraphTDB ;
    tdb:location "DB" ;
.

It works fine and it is able to do RDFS inference and even to insert new triples. However, once I stop and restart the server, it raises the following exception:

Error 500: Invalid id node for subject (null node): ([000000000000001D], [00000000000000AF], [000000000000003D])

回答1:


<#tdbGraph> rdf:type tdb:GraphTDB ;
    tdb:location "DB" ;
.

Get rid of the semi colon after the second statement and terminate with the full stop ie:

<#tdbGraph> rdf:type tdb:GraphTDB ;
        tdb:location "DB".


来源:https://stackoverflow.com/questions/10468940/can-i-configure-jena-fuseki-with-inference-and-tdb

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!