Using IN clause within FILTER clause, in SPARQL query -


i'm new sparql. i'm trying run query --

prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> prefix owl: <http://www.w3.org/2002/07/owl#> select * <http://purl.obolibrary.org/obo/merged/doid> {     ?nodeid owl:annotatedsource <http://purl.obolibrary.org/obo/doid_11330>.     #?nodeid rdf:type owl:annotation.     ?nodeid owl:annotatedproperty ?annotatedproperty.     ?nodeid owl:annotatedtarget ?annotatedtarget.     ?nodeid ?aaproperty ?aapropertytarget.     optional {?annotatedproperty rdfs:label ?annotatedpropertylabel}.     optional {?aaproperty rdfs:label ?aapropertylabel}.     filter (isliteral(?annotatedtarget)).        filter (not exists {?aaproperty in(owl:annotatedsource, rdf:type, owl:annotatedproperty, owl:annotatedtarget)     })} 

-- got error , don't know do. please me. thanks.

encountered " "in" "in "" @ line 13, column 41. expecting 1 of:     <iriref> ...     <pname_ns> ...     <pname_ln> ...     <var1> ...     <var2> ...     "a" ...     "distinct" ...     "multi" ...     "shortest" ...     "(" ...     "!" ...     "^" ... 

not exists expects graph pattern. want (just guessed)

prefix  rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix  owl:  <http://www.w3.org/2002/07/owl#> prefix  rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>  select  * <http://purl.obolibrary.org/obo/merged/doid>   { ?nodeid owl:annotatedsource <http://purl.obolibrary.org/obo/doid_11330> .     ?nodeid owl:annotatedproperty ?annotatedproperty .     ?nodeid owl:annotatedtarget ?annotatedtarget .     ?nodeid ?aaproperty ?aapropertytarget     optional       { ?annotatedproperty rdfs:label ?annotatedpropertylabel}     optional       { ?aaproperty rdfs:label ?aapropertylabel}     filter isliteral(?annotatedtarget)     filter ( ?aaproperty not in (owl:annotatedsource, rdf:type, owl:annotatedproperty, owl:annotatedtarget) )   } 

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -