我正在尝试学习更新Fuseki中的数据,但是当我尝试时遇到404错误。我显然没有做对。也许这是我的INSERT命令?我尝试了很多它们。
我在/sparql.tpl使用基于Web的SPARQL接口。
我可以让SPARQL查询在同一页面上正常工作。但第二种形式,标记为SPARQL更新是我正在使用的更新,这给了我错误:
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX booklet: <http://www.semanticweb.org/cstepnitz/ontologies/booklet>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ontology: <http://dbpedia.org/ontology/>
INSERT DATA
{ <http://dbpedia.org/resource/Johnny_Got_His_Gun>
rdf:type ontology:Book
}
这是表单发布到网址localhost时得到的错误:3030 / bookfinder / update:
Error 404: Not Found
Fuseki - version 1.0.1 (Build date: 2014-01-18T19:01:20+0000)
这是我的TTL文件。
@prefix : <http://www.semanticweb.org/cstepnitz/ontologies/bookreader#> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix booklet: <http://www.semanticweb.org/cstepnitz/ontologies/booklet> .
@prefix dbp: <http://dbpedia.org/ontology/> .
@prefix dbpedia: <http://dbpedia.org/ontology/> .
@prefix dbpedia-owl: <http://dbpedia.org/ontology/> .
@prefix NS5: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdms: <http://en.wikipedia.org/wiki/Comparison_of_relational_database_management_systems> .
@prefix owlapi: <http://www.semanticweb.org/owlapi#> .
@prefix schema: <http://schema.org/> .
@base <http://www.semanticweb.org/cstepnitz/ontologies/bookreader> .
<http://www.semanticweb.org/cstepnitz/ontologies/bookreader> NS5:type owl:Ontology ;
owl:imports dbp: .
booklet:readbook NS5:type owl:ObjectProperty ;
rdfs:range dbpedia-owl:Book ;
rdfs:domain booklet:Reading ;
rdfs:subPropertyOf owl:topObjectProperty .
booklet:reading NS5:type owl:ObjectProperty ;
rdfs:domain booklet:Bookreader ;
rdfs:range booklet:Reading .
:OWLObjectProperty_18e83c77_09cb_4d9b_90c6_93b2a5095d78 NS5:type owl:ObjectProperty ;
rdfs:label "recommendedBooks"@en ;
rdfs:range dbpedia-owl:Book ;
rdfs:domain booklet:Bookreader .
:OWLObjectProperty_86497b97_bef7_4b9e_80bc_6080ce0cbfe3 NS5:type owl:ObjectProperty ;
rdfs:label "bookrating"@en ;
rdfs:range booklet:Bookrating ;
rdfs:domain booklet:Reading ;
rdfs:subPropertyOf owl:topObjectProperty .
dbpedia-owl:Book NS5:type owl:Class .
schema:Person NS5:type owl:Class .
booklet:Bookrating NS5:type owl:Class .
booklet:Bookreader NS5:type owl:Class ;
rdfs:subClassOf schema:Person .
booklet:Reading NS5:type owl:Class .
:OWLClass_38c67bca_82ba_44b7_85dd_31d0c2883702 NS5:type owl:Class ;
rdfs:label "Poor"@en ;
rdfs:subClassOf booklet:Bookrating .
:OWLClass_5630d470_6dda_4cd5_9596_ddf0eab29cde NS5:type owl:Class ;
rdfs:label "Best"@en ;
rdfs:subClassOf booklet:Bookrating .
:OWLClass_694d8a9e_5fba_45a2_81b3_f47f1a21af4d NS5:type owl:Class ;
rdfs:label "Average"@en ;
rdfs:subClassOf booklet:Bookrating .
:OWLClass_dfb73eb5_8a7c_4628_a423_72056e7ee81f NS5:type owl:Class ;
rdfs:label "Good"@en ;
rdfs:subClassOf booklet:Bookrating .
:OWLClass_f3923184_fbb7_48ec_954e_49e233454099 NS5:type owl:Class ;
rdfs:label "Awful"@en ;
rdfs:subClassOf booklet:Bookrating .
任何猜测?
答案 0 :(得分:0)
正如我对问题的评论中所解释的那样,问题是需要在启动时添加“--update”标志。见http://jena.apache.org/documentation/serving_data/