I'd like to write RDF queries that query DBpedia and Wikidata. The README suggests aristotle wants an implementation of Jena's Graph interface, but all the SPARQL stuff seems to skip the Graph and just take a SPARQL query. I managed to get Jena working directly:
(let [q (QueryFactory/create "SELECT ?prop ?place WHERE { <http://dbpedia.org/resource/%C3%84lvdalen> ?prop ?place .}")
qx (QueryExecutionFactory/sparqlService "http://dbpedia.org/sparql" q)]
(.addParam ^QueryEngineHTTP qx "timeout" "10000")
(ResultSetFormatter/out System/out (.execSelect qx) q))
...but no object I'm touching there implements Graph. I eventually got to a Graph by clicking around in the apidocs and came up with:
(-> "http://dbpedia.org/sparql" RDFConnectionFactory/connect .fetch .getGraph)
... but I don't really know what that means and it errors out with a 400 Bad Request anyway.
(I am aware that as a workaround I can just download a database dump as e.g. Turtle and then import it with read :))
I'd like to write RDF queries that query DBpedia and Wikidata. The README suggests aristotle wants an implementation of Jena's Graph interface, but all the SPARQL stuff seems to skip the Graph and just take a SPARQL query. I managed to get Jena working directly:
...but no object I'm touching there implements Graph. I eventually got to a Graph by clicking around in the apidocs and came up with:
... but I don't really know what that means and it errors out with a 400 Bad Request anyway.
(I am aware that as a workaround I can just download a database dump as e.g. Turtle and then import it with
read:))