sparql

What is the difference between a temporal and a non-temporal query

∥☆過路亽.° 提交于 2020-01-24 18:16:25
问题 I have read some resources that talk about temporal and non-temporal queries, specifically with SPARQL. What is the difference between these two kinds of queries? 回答1: As you don't refer to a specific document that talks about temporal queries, i can only give a pretty broad answer: There are many approaches on how to model temporally constrained facts in RDF. As RDF itself is only concerned with triples/quads (subject, predicate, object(, graph)), many simple mapping approaches generate

Limiting graphs to be used by Factforge sparql endpoint

随声附和 提交于 2020-01-24 17:13:11
问题 Using http://www.sparql.org/sparql.html to run this query prefix oxprop: <http://ophileon.com/ox/property#> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix owl: <http://www.w3.org/2002/07/owl#> prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> prefix gn: <http://www.geonames.org/ontology#> select * from <http://www.ophileon.com/ox/poi.rdf> where { ?poi rdfs:label ?poiname. ?poi owl:sameAs ?geonameuri. SERVICE <http://factforge.net/sparql>{ ?geonameuri gn:population

Querying a repository in Open RDF and displaying the results

柔情痞子 提交于 2020-01-24 15:17:07
问题 I have loaded an RDF data-store into an OpenRDF Repository, and then I am trying to query the Repository and retrieve certain data based on the query. I am running a very simple query to get all the subjects predicates and the objects. But when I am trying to print the query results it is just showing the first triple. I am giving the code of the method which is doing the query work only, please check and let me know what is wrong.- private static void queryingRDF(Repository repo) { try{

How do you set the Collation for a SPARQL query?

試著忘記壹切 提交于 2020-01-24 13:22:25
问题 I am a Java developer working with a MarkLogic database. A key function of my code is its capacity to dynamically generate 4-6 SPARQL queries and run them via HTTP GET requests. The results of each are added together and then returned. I now need these results sorted consistently. Since I am paging the results of each query (using the LIMIT and OFFSET statements) each query has its own ORDER BY statement. Without embedding sorting into the queries the pages of results will be returned out of

Retrieve the collection of unionOf and intersectionOf for each OWL

♀尐吖头ヾ 提交于 2020-01-23 22:03:30
问题 I'm trying to extract intersectionOf and unionOf in an OWL file, where interesctionOf and unionOf consist of collection of classes, someValuesFrom or/and onProperty . I have created a SPARQL query which extracts the "collection" for the intersectionOf , but the problem is that some of the retrieved data are not related to the class. For example, I have class called man . This class has an equivalent class which is intersectionOf of three classes, namely, adult , person , and male .My SPARQL

how to query Dbpedia in Javascript

半城伤御伤魂 提交于 2020-01-23 09:54:53
问题 I want to get the Abtract of english article of civil engineering from Dbdepdia in Javascript. this is what I tried but it fail. <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <style type="text/css"> </style> </head> <script type="text/javascript"> var url = "http://dbpedia.org/sparql"; var query = "\ PREFIX dbpedia2: <http://dbpedia.org/resource/>\ PREFIX Abs: <http://dbpedia.org/ontology/>\ SELECT ?abstract\ WHERE {\ ?s dbpedia2:Civil

Is there a differense between a CONSTRUCT queries sent to a virtuoso endpoint and one sent to a Jena one?

て烟熏妆下的殇ゞ 提交于 2020-01-23 02:54:46
问题 I am trying to infer some new triples based on the following CONSTRUCT query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX dc: <http://purl.org/dc/elements/1.1/> PREFIX dcterms: <http://purl.org/dc/terms/> PREFIX gpml: <http://vocabularies.wikipathways.org/gpml#> PREFIX wp: <http://vocabularies.wikipathways.org/wp#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> CONSTRUCT { ?line rdf:type wp:DirectedInteraction . } WHERE { ?pathway dc:identifier ?wpIdentifier .{ SELECT

Querying DBpedia for English-only description (with SPARQL)

元气小坏坏 提交于 2020-01-22 17:47:05
问题 I'm querying dbpedia.org for a description of Big Ben with this SPARQL query: select ?desc where { <http://dbpedia.org/resource/Big_Ben> <http://www.w3.org/2000/01/rdf-schema#comment> ?desc } This returns a list of descriptions in at least 10 different languages. How do I specify that I only want the English language description? 回答1: The keys you need to know are that str() and lang() pull apart the text and language of the value, so you can do this: select str(?desc) where { <http://dbpedia

Filter by date range in SPARQL

老子叫甜甜 提交于 2020-01-22 11:07:06
问题 I am using Jena's SPARQL engine and trying to write a query to filter on a date range as I need to find the value of a property after a fixed date. My date property is in the following format: Fri May 23 10:20:13 IST 2014 How do I write a SPARQL query to get other properties with dates greater than this? 回答1: With your data in that format you can't filter on a range of it without adding a custom extension function to ARQ (which is intended for advanced users) since you would need to parse and

Filter by date range in SPARQL

六月ゝ 毕业季﹏ 提交于 2020-01-22 11:03:50
问题 I am using Jena's SPARQL engine and trying to write a query to filter on a date range as I need to find the value of a property after a fixed date. My date property is in the following format: Fri May 23 10:20:13 IST 2014 How do I write a SPARQL query to get other properties with dates greater than this? 回答1: With your data in that format you can't filter on a range of it without adding a custom extension function to ARQ (which is intended for advanced users) since you would need to parse and