virtuoso

How to return all S->P->O triples from a starting resource to a specified path depth?

狂风中的少年 提交于 2019-12-09 19:29:13
问题 My goal is to graphically represent the S->P->O relations within a depth two edges from the specified resource, p:Person_1 . I want all relations within that path length to be returned from my query as ?s, ?p, ?o for further processing in my graphical application. I tried the first query below which gives me my first set of ?s ?p ?o with repeats, then ?p2, ?o2, ?p3, ?o3 as additional columns in the result. I want to bind ?p2 and ?p3 to ?p , ?o2 and ?o3 to ?o . SELECT * WHERE { p:Person_1 ?p

add RDFS inference rules support in endpoint SPARQL

痴心易碎 提交于 2019-12-08 10:56:28
问题 I have create an endpoint SPAQL on OpenLink Virtuoso. All work well, but i have to access on the data in a Container, in particular a rdf:Seq. I have a Seq like this: <myrdf:has_stoptimes> <rdf:Seq rdf:about="http://test.com/343"> <rdf:li> <myrdf:StopTime rdf:about="http://test.com/StopTime/434"> ... </ns0:StopTime> </rdf:li> <rdf:li> <myrdf:StopTime rdf:about="http://test.com/StopTime/435"> ... </ns0:StopTime> </rdf:li> </rdf:Seq> Now i see that to access data in a container i can use rdfs

SPARQL federated query not working

放肆的年华 提交于 2019-12-08 08:30:35
问题 My basic issue is: I have two computers A and B with Virtuoso installed and I am trying to query from one computer to the next. I created an RDF graph on machine A and executed a query on A to see the locally stored data. sparql SELECT ?a ?b ?c FROM <http://localhost:8890/test> OPTION (get:soft "soft", get:method "GET") WHERE {?a ?b ?c}; It returned the data correctly. I run the following query on machine B sparql SELECT ?a ?b ?c FROM <http://ipAddressOfA:8890/test> OPTION (get:soft "soft",

How to list all all graphs in Virtuoso?

▼魔方 西西 提交于 2019-12-06 14:10:26
When I go to http://localhost:8890/sparql/ , there are two fields: Default Data Set Name (Graph IRI) and query . How can I list what all graphs (that go in the former field) are available in my DB? The field is not mandatory and I can just run a query against all namespaces. But I would like to know how to list the graphs available. The only non-empty graph I was able to run was http://localhost:8890/sparql For example, in a relational database environment, I believe this kind of info could be retrieved from system tables. As noted in comments, this query will get you a list of all Named

Closing OpenLink Virtuoso HTTP Connections

拈花ヽ惹草 提交于 2019-12-06 06:25:25
We are using OpenLink Virtuoso as the primary database manager for a NodeJS project. We query the database using SPARQL queries only, through the HTTP SPARQL endpoint. For this, we are using the request-promise library, with the following configuration: const queryRequest = rp({ method: "POST", uri: queryObject.fullUrl, form: { query: queryObject.query, maxrows: queryObject.maxRows, format: queryObject.resultsFormat }, headers: { 'content-type': 'application/x-www-form-urlencoded' }, json: true, forever : true, // Keep connections alive instead of creating new ones timeout : Config

SPARQL Query Error with OPTION(TRANSITIVE) on Jena

江枫思渺然 提交于 2019-12-06 05:30:56
I have the following Query PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?type WHERE { { SELECT * WHERE { ?x rdfs:subClassOf ?type . } } OPTION (TRANSITIVE, t_distinct, t_in (?x), t_out (?type) ) . FILTER (?x = <http://dbpedia.org/ontology/Hospital>) } It works fine when i send it to Virtuoso endpoint but does not work on my Jena instance. In specific i get the following error: INFO [1] 400 Parse error: PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?type WHERE { { SELECT * WHERE { ?x rdfs:subClassOf ?type . } } OPTION (TRANSITIVE, t_distinct, t_in (?x), t_out (?type

How to return all S->P->O triples from a starting resource to a specified path depth?

假装没事ソ 提交于 2019-12-04 16:28:28
My goal is to graphically represent the S->P->O relations within a depth two edges from the specified resource, p:Person_1 . I want all relations within that path length to be returned from my query as ?s, ?p, ?o for further processing in my graphical application. I tried the first query below which gives me my first set of ?s ?p ?o with repeats, then ?p2, ?o2, ?p3, ?o3 as additional columns in the result. I want to bind ?p2 and ?p3 to ?p , ?o2 and ?o3 to ?o . SELECT * WHERE { p:Person_1 ?p ?o . BIND("p:Person_1" as ?s) OPTIONAL{ ?o ?p2 ?o2 . } OPTIONAL{ ?o2 ?p3 ?o3 . } } Then, based on How do

Extract all parents of a given node

拈花ヽ惹草 提交于 2019-12-02 10:07:58
I'm trying to extract all parents of a each given GO Id (a node) using EBI-RDF sparql endpoint , I was based on this two similar questions to formulate the query, here're two examples illustrating the problem: Example 1 ( Link to the structure ): biological_process (GO:0008150) |__ metabolic process (GO:0008152) |__ methylation (GO:0032259) In this example, using the following query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX dc

How to check prefix of variables in SPARQL?

☆樱花仙子☆ 提交于 2019-12-02 09:43:48
问题 I want to find how many resource is there in an RDF but I can't find any tutorial to explain how can I check the prefix of variables in my SPARQL. I have tried this: select count(?x) where { res:?x ?p ?v } but it has syntax error. I am using virtuoso for DBPedia 回答1: You can use strstarts(string,prefix) to check whether string begins with prefix . You can use the str function to get the string representation of a IRI, including IRIs generated from prefixes. E.g., if you have prefix ex: <http:

SPARQL: Delete instance and all of its properties with linked subproperties

守給你的承諾、 提交于 2019-12-02 07:22:24
问题 I have a question about the deletion of elements from a triplestore (in my case a Virtuoso) using SPARQL. I have stored the following elements in a graph: @prefix xy: <http://purl.oclc.org/xy/xy#> . @prefix ssn: <http://purl.oclc.org/NET/ssnx/ssn#> . <point> a xy:Point ; xy:value "10" ; ssn:observationResultTime <Rs_b8d4ae44-6083-4140-b4e3-11fcf38a53c8> ; ssn:observationSamplingTime <St_b8d4ae44-6083-4140-b4e3-11fcf38a53c8> ; ssn:observedBy <SensorID-b8d4ae44-6083-4140-b4e3-11fcf38a53c8> . As