named-graphs

Single quad + most basic SPARQL query = 1 result in Jena, 2 results in Sesame - who is right?

人走茶凉 提交于 2019-12-05 11:16:01
Add just this one quad to an empty store: <http://x.com/s> <http://x.com/p> 2 <http://x.com/g> . Then execute this SPARQL query (taken from per Bob DuCharme's book 'Learning SPARQL', so this must be standard SPARQL for retrieving all quads across the dataset, regardless of implementation, right!?): SELECT ?g ?s ?p ?o WHERE { { ?s ?p ?o } UNION { GRAPH ?g { ?s ?p ?o } } } But Jena and Sesame reply with different answers!!? Here's what I see: Jena Fuseki console on Tomcat 6.0.37 (version 2.10.0 - out-of-the-box, no configuration changes!) - (the correct answer as I understand things): ----------

Querying named RDF graphs in TDB using tdbquery

走远了吗. 提交于 2019-12-02 09:25:27
问题 I am trying to query my newly created TDB database use the tdbquery program. However, I am having a hard time writing a query that targets the correct named graph. I am doing the following: First a create a new dataset and add a name graph called "facts" Dataset dataset = TDBFactory.createDataset("/tdb/"); dataset.begin(ReadWrite.WRITE) ; try { Model facts = RDFDataMgr.loadModel("lineitem.ttl") ; dataset.addNamedModel("facts", facts); dataset.commit(); TDB.sync(dataset); dataset.end(); }

Querying named RDF graphs in TDB using tdbquery

吃可爱长大的小学妹 提交于 2019-12-02 04:57:26
I am trying to query my newly created TDB database use the tdbquery program. However, I am having a hard time writing a query that targets the correct named graph. I am doing the following: First a create a new dataset and add a name graph called "facts" Dataset dataset = TDBFactory.createDataset("/tdb/"); dataset.begin(ReadWrite.WRITE) ; try { Model facts = RDFDataMgr.loadModel("lineitem.ttl") ; dataset.addNamedModel("facts", facts); dataset.commit(); TDB.sync(dataset); dataset.end(); } finally { dataset.close(); } When I query all graphs in my TDB database it looks fine. ./tdbquery --loc

tbloader vs SPARQL INSERT - Why different behaviour with named graphs?

时光毁灭记忆、已成空白 提交于 2019-12-01 18:49:53
There is a strange behaviour in the connection of the commandline tools of ARQ, TDB and Named Graphs. If importing data via tdbloader in a named graph it can not be queried via GRAPH clause in a SPARQL SELECT query. However, this query is possible when inserting the data in the same graph with SPARQL INSERT. I have following assembler description file tdb.ttl : @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> . [] ja

tbloader vs SPARQL INSERT - Why different behaviour with named graphs?

心不动则不痛 提交于 2019-12-01 17:14:49
问题 There is a strange behaviour in the connection of the commandline tools of ARQ, TDB and Named Graphs. If importing data via tdbloader in a named graph it can not be queried via GRAPH clause in a SPARQL SELECT query. However, this query is possible when inserting the data in the same graph with SPARQL INSERT. I have following assembler description file tdb.ttl : @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ja:

What is the SPARQL query to get the name of all graphs existing in my triplestore?

左心房为你撑大大i 提交于 2019-11-28 00:17:45
问题 I want to get the name of all existing graphs in my Fuseki server, it should return a message with a list of all graphs name. 回答1: I have tried the answer given by Joshua Taylor in Virtuoso, but got nothing. Maybe it's different between fuseki and virtuoso. So I provide a sparql for virtuoso users who just find the answer like me. SELECT DISTINCT ?g WHERE { GRAPH ?g { ?s ?p ?o } } 回答2: Without more context, we don't know whether you mean some additional metadata about the "name" of a graph,