sparna-git / Sparnatural

Sparnatural : visual SPARQL query builder for knowledge graphs in the browser, configurable with SHACL
http://sparnatural.eu
GNU Lesser General Public License v3.0
219 stars 41 forks source link

Idea : adding an "only" criteria #497

Open tfrancart opened 1 year ago

tfrancart commented 1 year ago

If I search for "Product containing Component = X" then I get products containing component X and other components as well. What if I would like to search for "Product containing only Component X" ? (= close the world) We would need an additionnal clause to close the query:

"Products containing Component = X and not containing another component different from X":

  ?Product_1 ex:containing ?Component_2 .
  VALUES ?Component_2 { ex:C_X }
  FILTER NOT EXISTS {   ?Product_1 ex:containing ?another_component . FILTER(?another_component != ex:C_X ) }

This could be an additionnal "green arrow" in addition to "Optional" / "Not Exists" : "Only"