named-graphs

Most efficient way to clear a named graph?

旧时模样 提交于 2021-01-03 05:45:41
问题 I am working with an instance of Ontotext GraphDB and often want to clear a named graph with a large number of triples. Currently, my technique involves issuing a SPARQL command to the graph server, which searches and matches a triple pattern of every triple in the named graph: DELETE { GRAPH example:exampleGraph { ?s ?p ?o }} WHERE {?s ?p ?o .} When there are a lot of triples, this approach often takes quite some time to clear the named graph. I am wondering whether there is a more efficient

Most efficient way to clear a named graph?

只谈情不闲聊 提交于 2021-01-03 05:45:40
问题 I am working with an instance of Ontotext GraphDB and often want to clear a named graph with a large number of triples. Currently, my technique involves issuing a SPARQL command to the graph server, which searches and matches a triple pattern of every triple in the named graph: DELETE { GRAPH example:exampleGraph { ?s ?p ?o }} WHERE {?s ?p ?o .} When there are a lot of triples, this approach often takes quite some time to clear the named graph. I am wondering whether there is a more efficient

Reasoning with Fuseki, TDB and named graphs?

霸气de小男生 提交于 2019-12-30 09:31:57
问题 I'm serving a dataset containing 10-20 named graphs from a TDB dataset in Fuseki 2. I'd like to use a reasoner to do inference on my data. The behaviour I'd like to see is that triples inferred within each graph should appear within those graphs (although it would be fine if the triples appear in the default graph too). Is there a simple way of configuring this? I haven't found any configuration examples that match what I am trying to do. The configuration I've tried is very similar to the

Generate Graph with sub-Graphs using sparql

偶尔善良 提交于 2019-12-22 10:37:40
问题 I have the following situation in my RDF-store: Named Graph: A S1 P1 O1 Named Graph: B S2 P2 O1 Named Graph: C S3 P3 O1 I now want to define a SPARQL Query which finds all Graphs where O1 is in the tripples, and stores those 3 Graphs + the tripples in a new Graph with the name A+B+C NEW Named Graph: A+B+C Named Graph: A S1 P1 O1 Named Graph: B S2 P2 O1 Named Graph: C S3 P3 O1 With Construct or insert Into i only found out how to build a graph out of tripples, bzw not how to build a graph

transform my rdf file to a named graph file

梦想与她 提交于 2019-12-11 12:49:13
问题 For a project I have to use Apache Jena as an API and Blazegraph as a triple store, I am trying to program a code that allows me to transform my dataset (N-Triples File) to a file that contains the NamedGraph of each statement. String APIUrl = "http://localhost:9999/bigdata/namespace/drugbank/sparql"; String req = "select * WHERE {?x ?y ?z}"; RDFConnection conn = RDFConnectionFactory.connect(APIUrl); FileManager.get().addLocatorClassLoader(Main.class.getClassLoader()); Model model =

SPARQL 1.1 entailment regimes and query with FROM clause (follow-up)

浪子不回头ぞ 提交于 2019-12-11 12:07:48
问题 This is a follow-up question from SPARQL 1.1 entailment regimes and query with FROM clause I'm currently documenting/testing about SPARQL 1.1 entailment regimes and the recommendation repeatedly states that The scoping graph is graph-equivalent to the active graph... So it would seems that the inference scoping graph depends on the query. The question is: does the scoping graph stems from the query's dataset (FROM/FROM NAMED clauses) or does it refer to the real current active graph context

SPARQL query works in Fuseki but not in Jena TDB

本秂侑毒 提交于 2019-12-11 03:21:42
问题 I have my data organised in multiple graphs. The graph in which a triple is saved matters. The data structure is complicated but it can be simplified like this: My store contains cakes, where there's a hierarchy of different cake types, all subclasses of <cake> <http://example.com/a1> a <http://example.com/applecake> <http://example.com/a2> a <http://example.com/rainbowcake> ... Depending on how they get created by a user in a UI, they end up in a different graph. If for instance the user

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

≡放荡痞女 提交于 2019-12-07 05:30:27
问题 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

Generate Graph with sub-Graphs using sparql

跟風遠走 提交于 2019-12-06 02:05:49
I have the following situation in my RDF-store: Named Graph: A S1 P1 O1 Named Graph: B S2 P2 O1 Named Graph: C S3 P3 O1 I now want to define a SPARQL Query which finds all Graphs where O1 is in the tripples, and stores those 3 Graphs + the tripples in a new Graph with the name A+B+C NEW Named Graph: A+B+C Named Graph: A S1 P1 O1 Named Graph: B S2 P2 O1 Named Graph: C S3 P3 O1 With Construct or insert Into i only found out how to build a graph out of tripples, bzw not how to build a graph which contains graphs? Is this possible, if yes how? Tank you You can't do exactly what you want because

SPARQL 1.1 entailment regimes and query with FROM clause

倾然丶 夕夏残阳落幕 提交于 2019-12-05 18:44:52
I'm currently documenting/testing about SPARQL 1.1 entailment regimes and the recommendation repeatedly states that The scoping graph is graph-equivalent to the active graph but it does not specifies what is the active graph referring to : is it the data-set used in the query ? a union of all graphs in the store ? As a test to determine this , I got this graph URIed <http://www.example.org/> in a Sesame Memory store with RDF Schema and direct type inferencing store (v2.7.14) @prefix ex:<http://www.example.org/> . ex:book1 rdf:type ex:Publication . ex:book2 rdf:type ex:Article . ex:Article rdfs