sparql - Is it possible to Filter Graphs in a way that they at most contain requested Data? -


let me start example query explain problem:

select ?g ?s ?p ?o {   {graph ?g     {   ?s ?p ?o.         optional{ ?s           ab:temperature ?temperature.}       filter (?temperature = 20)       filter not exists {?s ab:person ?person}     }   } } 

this query gives me graphs (in case representing context data) have temperature of 20 don't have person associated. problem want query graphs optional properties shouldn't have other properties. @ time of query know optional part don't know additional property might there. there easy way sparql or easier check after received graph , converted object can handle programm?

if understand question correctly, searching graphs have subjects properties not others. in case i'd run this:

select ?g ?s ?p ?o {  graph ?g {   ?s ?p ?o.   filter not exists {    ?s ?bad [] .    filter (?bad not in ( ab:temperature, ... ) )   }  } } 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -