开发者

Determine if a specific triple exists using SPARQL

开发者 https://www.devze.com 2023-01-15 01:41 出处:网络
If the data set is: @prefix dc:<http://purl.org/dc/elements/1.1/> . @prefix :<http://example.org/book/> .

If the data set is:

@prefix dc:   <http://purl.org/dc/elements/1.1/> .
@prefix :     <http://example.org/book/> .
@prefix ns:   <http://example.org/ns#> .

:book1  dc:title  "SPARQL Tutorial" .
:book2  dc:title  "The Semantic Web" .
开发者_JAVA技巧

How do I check that the triple :book1 dc:title "SPARQL Tutorial" . exists?

I can do SELECT ?book where {?book dc:title "SPARQL Tutorial"} but then I have to do post processing to determine if 'book1' was retrieved!


ASK  { ?book dc:title "SPARQL Tutorial" }
0

精彩评论

暂无评论...
验证码 换一张
取 消