grafter
grafter copied to clipboard
Calling statements on a repository should return results from default graph
There are methods already in sesame which we could leverage to do this... with a thread to pipe things into a sequence etc...
(let [r (repo)]
(grafter.rdf.protocols/add r [(grafter.rdf.protocols/->Quad ":a" ":a" ":a" nil) (grafter.rdf.protocols/->Quad ":a" ":a" ":a" ":c")])
(.exportStatements
(->connection r) nil nil nil false
(reify org.openrdf.rio.RDFHandler
(handleStatement [this statement]
(println statement))
(handleNamespace [this prefix uri]
;;TODO: are namespaces re-written? Need to re-write results if
;;so...
(println prefix))
(startRDF [this] (println "start"))
(endRDF [this] (println "end"))
(handleComment [this comment] (println "comment"))) (into-array Resource [])))