sparql

Convert a Jena ResultSet to Model

牧云@^-^@ 提交于 2021-01-27 13:58:40
问题 I'm trying to convert a ResultSet to a Model in Apache Jena 3.0. Previously I used the ResultSetFormatter.toModel function, but this seems to have been removed. What's the best way currently to get a Model (for serialization to JSON-LD and RDF/XML) of the ResultSet? 回答1: RDFOutput.toModel ResultSetFormatter operations were deprecated in jena 2.13.0 with placeholders left behind and javadoc referring to RDFOutput . 来源: https://stackoverflow.com/questions/32157314/convert-a-jena-resultset-to

is there a method to select all categories MeSH with sparql

前提是你 提交于 2021-01-07 03:22:32
问题 i want to get data with sparql from Medical Subject Headings RDF i try to do this code : PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX meshv: <http://id.nlm.nih.gov/mesh/vocab#> PREFIX mesh: <http://id.nlm.nih.gov/mesh/> PREFIX mesh2015: <http://id.nlm.nih.gov/mesh/2015/> PREFIX mesh2016: <http://id.nlm.nih.gov/mesh/2016/> PREFIX mesh2017: <http://id.nlm.nih.gov/mesh/2017/> SELECT DISTINCT ?descriptor ?label FROM <http://id.nlm.nih.gov

is there a method to select all categories MeSH with sparql

拈花ヽ惹草 提交于 2021-01-07 03:22:11
问题 i want to get data with sparql from Medical Subject Headings RDF i try to do this code : PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX meshv: <http://id.nlm.nih.gov/mesh/vocab#> PREFIX mesh: <http://id.nlm.nih.gov/mesh/> PREFIX mesh2015: <http://id.nlm.nih.gov/mesh/2015/> PREFIX mesh2016: <http://id.nlm.nih.gov/mesh/2016/> PREFIX mesh2017: <http://id.nlm.nih.gov/mesh/2017/> SELECT DISTINCT ?descriptor ?label FROM <http://id.nlm.nih.gov

Where is the “SPARQL” button in OntoRefine tab of GraphDB 9.5 Free Edition?

大兔子大兔子 提交于 2021-01-04 04:51:36
问题 I wanted to transform tabular data into linked data. I was trying to use SPARQL construct to achieve this in GraphDB 9.5 Free edition. From the tutorials in GraphDb website it says "You can press the button SPARQL from the right top corner to access SPARQL end point" . On the new version GraphDb 9.5 there is no SPARQL button after i loaded my tabular data. How do i access the SPARQL endpoint so that i can do my Construct queries? 回答1: With GraphDB 9.4 we introduced an entirely revamped

Using condition in SPARQL query

会有一股神秘感。 提交于 2021-01-03 06:21:07
问题 I have a SPARQL query which is like this- SELECT ?informationPath ?businessEntitylabel ?path ?sourced ?mastered ?delivered WHERE { ?businessEntity dd:hasPropertyPath ?informationPath . ?businessEntity rdfs:label ?businessEntitylabel . ?informationPath dd:hasPath ?path . OPTIONAL { ?informationPath a dd:SourcedData . BIND("Yes" as ?sourced) } OPTIONAL { ?informationPath a dd:MasteredData . BIND("Yes" as ?mastered) } OPTIONAL { ?informationPath a dd:DeliveredData . BIND("Yes" as ?delivered) } }

Using condition in SPARQL query

浪子不回头ぞ 提交于 2021-01-03 06:16:44
问题 I have a SPARQL query which is like this- SELECT ?informationPath ?businessEntitylabel ?path ?sourced ?mastered ?delivered WHERE { ?businessEntity dd:hasPropertyPath ?informationPath . ?businessEntity rdfs:label ?businessEntitylabel . ?informationPath dd:hasPath ?path . OPTIONAL { ?informationPath a dd:SourcedData . BIND("Yes" as ?sourced) } OPTIONAL { ?informationPath a dd:MasteredData . BIND("Yes" as ?mastered) } OPTIONAL { ?informationPath a dd:DeliveredData . BIND("Yes" as ?delivered) } }

Specifying dataset within a SPARQL query

烈酒焚心 提交于 2021-01-03 06:15:49
问题 In some tutorial I'm reading, I see that you can specify the dataset separately from your query, like this: Dataset field: http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?person foaf:name ?name . } How do I specify the dataset from within the query? 回答1: Use the FROM keyword: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name FROM <http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf> WHERE { ?person foaf:name ?name

Specifying dataset within a SPARQL query

醉酒当歌 提交于 2021-01-03 06:14:23
问题 In some tutorial I'm reading, I see that you can specify the dataset separately from your query, like this: Dataset field: http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf query: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name WHERE { ?person foaf:name ?name . } How do I specify the dataset from within the query? 回答1: Use the FROM keyword: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?name FROM <http://dig.csail.mit.edu/2008/webdav/timbl/foaf.rdf> WHERE { ?person foaf:name ?name

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