1/ The data is likely wrong.

Get it working with a query string in your program exactly like the tutorial.

You have a graph name of

<file:src/main/resources/dataset-named-graph-1.ttl>

in the code and

<dataset-named-graph-1.ttl>

in the data. The relative URIs will be resolved to absolute ones.

Try using

<file:///...your filing system path.../src/main/resources/dataset-named-graph-1.ttl>

in both places or put the files in the currentl directory, not src/main/resources/

And print the data and the query to check.


2/ The algebra is printable so print out the op you build and print out the query.

http://www.sparql.org/query-validator.html

The algebra should be:

    (project (?date ?title ?g)
      (filter (> ?date "2005-08-01T00:00:00Z"^^xsd:dateTime)
        (join ## Or (sequence)
          (bgp (triple ?g dc:date ?date))
          (graph ?g
            (bgp (triple ?b dc:title ?title))))))

You can also use the command line "qparse" to get thiswith --print=op.

3/ Start simple and add bits until it stops working:

e.g. Check the graph names with:

(graph ?g
   (bgp (triple ?s ?p ?o))




    Andy


Reply via email to