Fuseki SPARQL INSERT会产生“错误400:SPARQL查询:没有'query ='参数" [英] Fuseki SPARQL INSERT produces the "Error 400: SPARQL Query: No 'query=' parameter"
问题描述
我尝试将个人插入到本体中,但出现错误:
I try to insert an individual into my ontology, but get the error:
Error 400: SPARQL Query: No 'query=' parameter
Fuseki - version 2.4.1 (Build date: 2016-11-04T18:59:20+0000)
这是我的SPARQL INSERT查询#1:
This is my SPARQL INSERT query #1:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX oo: <http://www.test.com/test-ontology.owl#>
INSERT {
oo:cap_123 rdf:type oo:MyTours .
oo:cap_123 oo:active true .
oo:cap_123 oo:title 'Text text text' .
}
WHERE {
FILTER NOT EXISTS { oo:cap_123 rdf:type oo:MyTours .
}
}
这是我的INSERT查询#2:
And this is my INSERT query #2:
INSERT DATA {
oo:cap_123 rdf:type oo:MyTours .
oo:cap_123 oo:active true .
oo:cap_123 oo:title 'Text text text' .
}
如果我使用Protégé插入个人,那么它将起作用并保存结果,如下所示:
If I insert the individual using Protégé, then it works and saves the result as follows:
<owl:NamedIndividual rdf:about="http://www.test.com/test-ontology.owl#cap_123">
<rdf:type rdf:resource="http://www.test.com/test-ontology.owl#MyTours"/>
<active rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</active>
<title>Text text text</title>
</owl:NamedIndividual>
两个查询均失败.他们怎么了?
Both queries fail. What is wrong with them?
推荐答案
您的SPARQL端点地址是什么?它应以/update
(而不是/query
)结尾:
What is your SPARQL endpoint address? It should end with /update
(instead of /query
):
http://example.com/dataset.html?tab=info&ds=/<dataset_name>
上列出了可用的服务:
Available services are listed on http://example.com/dataset.html?tab=info&ds=/<dataset_name>
:
- 配置文件为
%FUSEKI_HOME%/run/configuration/<dataset_name>.ttl
-
%FUSEKI_HOME%/run/shiro.ini
中的访问权限可能受到限制
- Configuration file is
%FUSEKI_HOME%/run/configuration/<dataset_name>.ttl
- Access might be restricted in
%FUSEKI_HOME%/run/shiro.ini
这篇关于Fuseki SPARQL INSERT会产生“错误400:SPARQL查询:没有'query ='参数"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!