SPARQL构造.如何将RDF属性的值分配给实际的RDF变量 [英] SPARQL Construct. How to assign the value of an RDF attribute to an actual RDF variable
本文介绍了SPARQL构造.如何将RDF属性的值分配给实际的RDF变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的查询(摘录)大致是这个.
My query (excerpt) is roughly this.
CONSTRUCT {
?publication fb:type ?type;
fb:publicationType ?publicationType;
}
WHERE
{
?publication a bibo:Document .
?publication vitro:mostSpecificType ?publicationType .
}
它返回类似于...的输出
And it returns output similar to...
<rdf:Description rdf:about="https://abcd.fgh/individual/publication12345">
<fb:publication>Example pub title</fb:publication>
<fb:publicationType rdf:resource="http://purl.org/ontology/bibo/AcademicArticle"/>
</rdf:Description>
也许是一个初学者式的问题,但是我如何调整查询以使输出为:
Perhaps a beginner-esque question, but how do I tweak the query such that the output is:
<rdf:Description rdf:about="https://abcd.fgh/individual/publication12345">
<fb:publication>Example pub title</fb:publication>
<fb:publicationType>Academic Article</fb:publicationType>
</rdf:Description>
谢谢
推荐答案
假设 The 这篇关于SPARQL构造.如何将RDF属性的值分配给实际的RDF变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!bibo
本体在您要查询的商店中,您可以在
?a vitro:mostSpecificType/rdfs:label ?b
是?a vitro:mostSpecificType ?something. ?something rdfs:label ?b
的简写,没有绑定中间术语.?a vitro:mostSpecificType/rdfs:label ?b
is shorthand for ?a vitro:mostSpecificType ?something. ?something rdfs:label ?b
, without binding the intermediate term.
查看全文