有没有办法通过prefLabel(可视图形)搜索SKOS概念?另外,在结果中显示prefLabel?
答案 0 :(得分:0)
在GraphDB 8.3之前的所有版本中,更改返回结果的唯一方法是编辑打包为JAR文件中的资源文件的SPARQL查询。
修改查询并将rdfs:label
替换为另一个谓词:
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sesame: <http://www.openrdf.org/schema/sesame#>
PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
SELECT ?type ?label ?rank ?langPriority {{from}} {
{
BIND ({{nodeiri}} as ?iri)
{
?iri sesame:directType ?type.
}
UNION {
?iri rdfs:label ?label.
BIND(LANG(?label) AS ?langLabel)
BIND( {{langMatches}} AS ?langPriority)
}
UNION {
?iri rank:hasRDFRank ?rank
}
}
}
ORDER BY ?type ?langPriority