GraphStore`
GraphStore`

SPARQLFilter

SPARQLFilter[expr]

represents a filter in a SPARQL graph pattern.

Details

  • A filter can appear anywhere inside a list of SPARQL patterns.
  • A list of SPARQL patterns is known as a group graph pattern.
  • expr typically contains SPARQLVariable objects.
  • expr typically is an expression that evaluates to a Boolean. Examples include SPARQLVariable["x"]>5 and SPARQLEvaluation["strstarts"][SPARQLVariable["title"],"A"].
  • A group graph pattern {patt1,,SPARQLFilter[expr],} matches a list of triples if all the patterns patti match and values for variables from those matches, when substituted into the expression expr, make the expression evaluate to True.

Examples

open allclose all

Basic Examples  (1)

Data about books:

Find books published before 1850:

Properties & Relations  (1)

Export a query containing a filter as a SPARQL string: