sparql

DBpedia SPARQL search similar to DBpedia lookup facility

被刻印的时光 ゝ 提交于 2019-12-23 17:23:50
问题 DBpedia offers a look up facility like http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryString=panda that returns a result set. Can the same result set be obtained by using SPARQL to query DBpedia 来源: https://stackoverflow.com/questions/15667133/dbpedia-sparql-search-similar-to-dbpedia-lookup-facility

Filtering based on a URI in SParQL [duplicate]

放肆的年华 提交于 2019-12-23 16:07:10
问题 This question already has an answer here : Exclude results from DBpedia SPARQL query based on URI prefix (1 answer) Closed 3 years ago . You can run the query below at the Linked MDB SPARQL Explorer. The values of ?imdbID (the last variable) contains IRIs from one of three possible domains (freebase.com, rottentomatoes.com or imdb.com). I would like to know how to apply a filter such that only the rows from the imdb.com domain are retained. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

Generating values for empty attributes

那年仲夏 提交于 2019-12-23 16:01:54
问题 I am trying to fill the empty spaces generated by the use of Optional in the SPARQL query language. Are there any ways that I can achieve this? The use of !bound on the optional variable generates true or false, but I want to fill the cells with my own values such as "?" or "unknown". 回答1: Perhaps you could use one of the following constructs... COALESCE(?c, "unknown") Source: http://www.w3.org/TR/sparql11-query/#func-coalesce or IF(bound(?c), ?c, "unknown") Source: http://www.w3.org/TR

How to validate datetime object in SPARQL? (Virtuoso 22007 Error DT006)

荒凉一梦 提交于 2019-12-23 12:36:28
问题 I get the following error. Virtuoso 22007 Error DT006: Cannot convert -0359 to datetime : Incorrect month field length SPARQL query: define sql:big-data-const 0 #output-format:text/html define sql:signal-void-variables 1 select ?item bif:year(xsd:dateTime( str(?dob))) as ?m{ ?item <h://f.cm/ns/common/topic/notable_types> <h://f.cm/ns/people/person> . ?item <h://f.cm/ns/people/person/date_of_birth> ?dob } limit 675 If I change the limit to 674 , it works. What I suspected was that some

How to get a concise bounded description of a resource with Sesame?

左心房为你撑大大i 提交于 2019-12-23 09:01:54
问题 I've been testing Sesame 2.7.2 and I got a big surprise when faced to the fact that DESCRIBE queries do not include blank nodes closure [ EDIT: the right term for this is CBD for concise bounded description ] If I correctly understand, the SPARQL spec is quite loose on that and says that what is returned is actually up to the provider, but I'm still surprised at the choice, since bnodes (in the results of the describe query) cannot be used in subsequent SPARQL queries. So the question is: how

The difference between blank nodes and variables in SPARQL queries

狂风中的少年 提交于 2019-12-23 06:59:04
问题 I've studied SPARQL specification on the topic and also found this answer rather interesting. However definitions are complicated enough, so I still don't see the answer for my question. I can't find any example of query with blank nodes that returns different results than the same query with variables in place of blank nodes. For example is there any case when the following queries return different results: SELECT ?a ?b WHERE { ?a :predicate _:blankNode . _:blankNode :otherPredicate ?b . }

jena.query.ResultSet and jena.query.QuerySolution: hasNext() returns alway false after SPARQL request

最后都变了- 提交于 2019-12-23 06:12:22
问题 I have a problem with receiving SPARQL response. The problem is .... when I use the following source code, rs.hasNext() always return false even though the response shouldn't be empty. SPARQL Query: PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?s ?sl <http://dbpedia.org/property/name> ?o ?ol FROM <http://en.dbpedia.org/20120601/> WHERE { ?s rdfs:label ?sl . ?s <http://dbpedia.org/property/name> ?o . ?o rdfs:label ?ol .

Adding age (integer literals) to Jena RDF triples, and querying on them with SPARQL

前提是你 提交于 2019-12-23 05:29:19
问题 I'm trying to learn the basics of working with Jena and RDF Triples. Also working with an Oracle database, so following their guide I have some sample programs running, such as Example7-18 SPARQL OPTIONAL Query. The example works fine as written. It allows for matching queries such as where {?s <u:parentOf> ?o} where {<u:John> <u:parentOf> <u:Mary>} What I'd like to do is give John, Mary and Jill an age each, so that I can query and filter on age as described in SPARQL By Example: The Cheat

Sparql Select Query works on Sesame-Workbench but not on Java

泪湿孤枕 提交于 2019-12-23 05:20:04
问题 I'm trying to create a Sparql-Query to get all messages, that are related to a lecture. I'm new at the whole 'semantic web'-story so be patient if the usage namespace is completely wrong. The query I try to execute is: PREFIX siocNS: <http://rdfs.org/sioc/ns#> PREFIX rdfPred: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX purlPred: <http://purl.org/dc/terms/> PREFIX purlPredLecture: <http://purl.org/<CENSORED>/lecture/> select ?post ?title ?content ?time ?creator where { ?post rdfPred

Sparql query getting duplicate or not I dont understant

余生颓废 提交于 2019-12-23 02:39:20
问题 I am using this query to get all programming languages and their details. This is my test class. I have used it in java and it works fine. The problem I am facing is, there is a language named "ML (programming language)" It prints multiple times with different abstract, different influenced. Not only ML but also some other languages doing this. I don't know is there any problem in my query or its getting exact data as it is. package io.naztech.dbpedia; import java.io.ByteArrayOutputStream;