我的查询(摘录)大致是这个。
CONSTRUCT {
?publication fb:type ?type;
fb:publicationType ?publicationType;
}
WHERE
{
?publication a bibo:Document .
?publication vitro:mostSpecificType ?publicationType .
}
它返回类似于......的输出
<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>
也许是一个初学者式的问题,但我如何调整查询以使输出为:
<rdf:Description rdf:about="https://abcd.fgh/individual/publication12345">
<fb:publication>Example pub title</fb:publication>
<fb:publicationType>Academic Article</fb:publicationType>
</rdf:Description>
由于
答案 0 :(得分:3)
假设bibo
ontology位于您要查询的商店中,您可以在property path中使用其rdfs:label
属性:
CONSTRUCT {
?publication fb:type ?type;
fb:publicationType ?publicationType;
} WHERE {
?publication a bibo:Document ;
vitro:mostSpecificType/rdfs:label ?publicationType .
FILTER (LANG(?publicationType) = "en")
}
?a vitro:mostSpecificType/rdfs:label ?b
是?a vitro:mostSpecificType ?something. ?something rdfs:label ?b
的简写,没有约束中间词。