sparql

How to get rdf file from sparql endpoint

余生长醉 提交于 2020-01-13 04:16:00
问题 I am new in opendata and need some help. Wikipedia have their sparql endpoint in this url: http://dbpedia.org/sparql Now I need to write webservice to get some rdf file from dbpedia. What should I send to this endpoint to get rdf file ? 回答1: Send a CONSTRUCT query. A little example: CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o } LIMIT 10 The WHERE clause works just like that of SELECT only the values fill the CONSTRUCT block as a kind of template. It's very flexible - you can either copy

Best way to create a SPARQL endpoint for a RDBMS (MySQL database)

会有一股神秘感。 提交于 2020-01-12 08:40:35
问题 I am doing (want to do) some experiments with Linked Open Datasets particularly those put out by governments. I have a RDBMS (more specifically MySQL). I designed it with semantic web ideas in mind i.e. I have a information stored as objects, predicates and classes which define objects. In turn all objects are related to each other though statements of the form subject --> predicate --> object (where the subjects are from the objects table). I want to be able to query other RDF triple stores

HM Land Registry SPARQL query for multiple postcodes [closed]

点点圈 提交于 2020-01-11 12:32:21
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I have a list of about 900 postcodes for each solar farm in England and Wales. I would like to find the house prices for each postcode, to see how house prices may have changed after the solar farms were implemented. I am new to SPARQL and have no idea how to do a single query for all the postcodes. If anyone

Retrieving dbpedia-owl:type value of resource with dbpedia-owl:wikiPageRedirect value?

匆匆过客 提交于 2020-01-09 05:37:44
问题 Visitng http://dbpedia.org/resource/Cupertino shows the DBpedia RDF information about Cupertino. As you can see, it has, among others, the property and value: dbpedia-owl:type dbpedia:City However, this query on the DBpedia endpoint returns no results: SELECT ?type WHERE { dbpedia:Cupertino dbpedia-owl:type ?type } SPARQL results Why can't I retrieve the value of the dbpedia-owl:type property? 回答1: You've got an interactive webservice in front of you, and one of the most useful things that

results = results['results']['bindings'] Flask error

穿精又带淫゛_ 提交于 2020-01-07 08:07:19
问题 I try to obtain results bindings by this Sparql query. Through this Sparql entry point: http://digitale.bncf.firenze.sbn.it/openrdf-workbench/repositories/NS_03_2014/query I have the error: "TypeError: query() takes at least 2 arguments (1 given) Thank you!!! @app.route('/caricaArgomento/<type>', methods=['GET']) def getArgomento(type): #sparql = SPARQLUpdateStore("http://digitale.bncf.firenze.sbn.it/openrdf- workbench/repositories/NS_03_2014/query") sparql=SPARQLUpdateStore("http://digitale

How to iterate over CONSTRUCT output from rdflib?

独自空忆成欢 提交于 2020-01-07 03:05:28
问题 This is a follow-up question from How to prevent triples from getting mixed up while uploading to Dydra programmatically? I've created a new graph using SPARQL CONSTRUCT query. I now want to iterate over it so that I can add the statements to an RDFlib graph and then insert the data into another triplestore. I have the following questions: If SPARQL CONSTRUCT returns a graph, do I still need to iterate over the statements and add them to an RDFlib graph? I probably need to do so to be able to

delete a node or triple using dotenetrdf librery?

試著忘記壹切 提交于 2020-01-07 02:03:53
问题 I have an n3 file formate and i want to delete a node or triple from it how can i do it? should i use sparql query?please help me i want to have an n3 file and want to delete a node from it. i pass a graph that use in my parent form to this delete form and want to work with this graph that i create from an n3 file i mean i read this n3 file and convert it to a graph and send it to this form. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using

How to create a SPARQL endpoint using Virtuoso?

风流意气都作罢 提交于 2020-01-07 00:34:46
问题 I have just setup Virtuoso and I have loaded an OWL file (created with Protege software) present on my local machine in to Virtuoso using the following code: SQL> DB.DBA.RDF_LOAD_RDFXML_MT (file_to_string_output ('antibiotics.owl'), '', 'http://myexample.com'); Now, my question is how do I access the URI myexample.com ? How do I create a SPARQL endpoint in Virtuoso so that I can query it? 回答1: No need to create a sparql endpoint, since it's already there. Check the inserted RDF data on your

Multiple statements query SPARQL 1.1 property-paths Virtuoso 7.2.X

假装没事ソ 提交于 2020-01-06 20:25:17
问题 A sample RDF dataset has entries owl#NamedIndividual grouped by owl#Class and a custom relation named IsMemberOf . When I try to obtain a list of results segregated by their type, it works well but the moment I add a way to obtain their corresponding IsMemberOf I don't get expected results. Here is three SPARQL 1.1 queries I gave to Virtuoso (sample dataset below): Query 1 sparql select * from <test> where { #If I uncomment the next line I don't get the proper results # ?s <IsMemberOf>

coalesce not working in this example

≡放荡痞女 提交于 2020-01-06 18:38:36
问题 This is my minimum data: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rs: <http://www.SemanticRecommender.com/rs#> PREFIX mo: <http://www.musicontology.com/mo#> PREFIX : <http://www.musicsemanticontology.com/mso#> mo:5th_symphony_for_beethoven a mo:GermanSymphony . :symphonyFestival2016 a rs:TemporalContext ; rs:appliedOnItems mo:GermanSymphony ; rs:canBeRecommendedFrom "2016-07-01T00:00:00-00:00"^^xsd:dateTime ; rs