本文介绍了我可以使用推断和TDB配置Jena Fuseki吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想用TDB支持的推理模型来配置Fuseki.
I want to configure Fuseki with an inference model supported by TDB.
我已经能够使用内存模型进行配置,但是不能使用可以更新三元组的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" ;
.
它工作正常,并且能够进行RDFS推断,甚至可以插入新的三元组.但是,一旦我停止并重新启动服务器,它将引发以下异常:
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])
推荐答案
<#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".
这篇关于我可以使用推断和TDB配置Jena Fuseki吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!