I'm encountering a problem inserting into named graphs when doing so programmatically.

Pardon my clojure, but I think its intent is pretty clear, let me know and I'll translate to java-ish pseudocode:


(let [model (TDBFactory/createModel (ensure-directories-exist "/home/escott/test1TDB")),
          update-request (UpdateFactory/create)
        ]
    (.add update-request "Create Graph <http://myDB.com/ng>")
(.add update-request "INSERT DATA {graph <http://myDB.com/ng> {<http://myDB.com/a><http://myDB.com/b><http://myDB.com/c>}}")
    (UpdateAction/execute update-request model)
    (.close model)))

This runs without error, and is similar to code I've called in the past which works fine, but does not insert into a named graph.


However, when I make (say) this call:

    (let [model (TDBFactory/createModel "/home/escott/test1TDB")
      ]
      (sparql-query model "select ?g where {graph ?g {}}")))

I get no errors, but an empty response.

I have also entered exactly these update requests in fuseki and gotten the expected behavior (a listing of named graphs, including the one I just created).


Here are my maven spex:

         [org.apache.jena/jena-core "2.7.0-incubating"]
         [org.apache.jena/jena-arq "2.9.0-incubating"]
         [org.apache.jena/jena-tdb "0.9.0-incubating"]


Is this a bug, or am I doing it wrong?

Thanks,

Reply via email to