1

如何修改此查询以仅显示具有名称的乐队"kinks"= #kinks之后我尝试标记dc:Band但没有结果。

 Query SPARQL_QUERY = QueryFactory.create("" +
           "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>" +           
           "PREFIX dc: <http://ontologyloc.com/Bands.owl#>" +
           "SELECT DISTINCT ?BandName WHERE { ?BandName rdf:type dc:Band }" 
           );
4

1 回答 1

1

我不知道你的本体,但它可能是这样的

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>        
PREFIX dc: <http://ontologyloc.com/Bands.owl#>

SELECT DISTINCT ?BandName WHERE {
?BandName rdf:type dc:Band .
?BandName dc:title "kinks" .
}
于 2010-03-05T05:40:44.117 回答