sparql

Developing a Semantic Web Application

回眸只為那壹抹淺笑 提交于 2019-12-13 11:18:27
问题 Although i have a little bit of experience in developing dynamic websites using ASP technologies, but I am new to semantic web programming, and i intend to implement a website based on semantic web technology.I would like to develop a search engine, where a web user can query for keywords from the backend RDF triple store.I want to implement the website using Java and JSP.I have following questions: I am currently studying Jena framework and SPARQL to start with,but i am not sure what other

SPARQL equivalent of a SQL select query?

这一生的挚爱 提交于 2019-12-13 09:52:41
问题 If I have a SQL table that can be queried like this: Select empname from mytable Where empid=1; What would an equivalent SPARQL query be? 回答1: As a few people have mentioned here and on your similar, previous question, you probably need to do some more reading about the nature of RDF-modeled data. For Stack Overflow, you definitely need to get into the habit of showing your input data and whatever code you have written so far , even if it isn't working perfectly. In that case, you need to

To write a query SPARQL in Java code using strstarts filter

狂风中的少年 提交于 2019-12-13 09:36:54
问题 I would like to write this SPARQL query in Java using Jena: prefix dbpediaont: <http://dbpedia.org/ontology/> prefix dbpedia: <http://dbpedia.org/resource/> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> select ?resource where { dbpedia:Fred_Guy rdf:type ?resource filter strstarts(str(?resource), "http://dbpedia.org/ontology") } I'm using this code: public QueryExecution query(){ String stringa = "http://dbpedia.org/resource/Fred_Guy"; ParameterizedSparqlString qs = new

SPARQL and Rules for ontologies

别等时光非礼了梦想. 提交于 2019-12-13 08:56:32
问题 Is it possible to create if/then rules using SPARQL and infer new relationships on my data? For example, could I encode rules like the following? if (blood_sugar > 126 and blood_sugar < 500) then blood_sugar_level = High if (blood_sugar_level = High) then (service = adjust_insulin_dose) 回答1: The question really doesn't provide enough data to figure out exactly what you're trying to do, but you can certainly bind values based on particular conditions. For instance, the following query includes

bif:contain error occurs when try to query dbpedia through my java program

两盒软妹~` 提交于 2019-12-13 08:27:25
问题 the code is for querying dbpedia from java program and then displaying the result in html page package jenaamem; import com.hp.hpl.jena.query.Query; import com.hp.hpl.jena.query.QueryExecution; import com.hp.hpl.jena.query.QueryExecutionFactory; import com.hp.hpl.jena.query.QueryFactory; import com.hp.hpl.jena.query.ResultSet; import com.hp.hpl.jena.query.ResultSetFormatter; import com.hp.hpl.jena.sparql.engine.http.QueryEngineHTTP; public class db2 { static public void main(String...argv) {

How to isolate a list of URIs in a RDF file using CONSTRUCT or DESCRIBE in SPARQL?

蓝咒 提交于 2019-12-13 08:22:42
问题 I'm trying to get only a list of URIs in RDF instead of a list of triples: PREFIX gr: <http://purl.org/goodrelations/v1#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> DESCRIBE ?product WHERE { ?product rdfs:subClassOf gr:ProductOrService . } Using SELECT , instead of DESCRIBE I receive only the subject (which I want), but not as an RDF but like a SPARQL Result with binds, vars, etc. Using CONSTRUCT , I can't specify only the ?product , as above, so the closest I can get is:

How to get the movies which are based on english novels using SPARQL in DBPEDIA

a 夏天 提交于 2019-12-13 08:14:56
问题 Using SPARQL, I am trying the get the list of all english novels and their properties. I would also like to find if a movie was taken based on that novel and get the movie name and its director, If a movie relationship exists. Code: SELECT ?movie ?director ?book ?author ?publisher ?illustrator WHERE { ?movie dcterms:subject <http://dbpedia.org/resource/Category:films> ; dbpedia-owl:basedOn ?book . ?movie dbp:director ?director . ?book a dbpedia-owl:Book . ?book dbp:author ?author . ?book dbp

Enable HTTPS/SSL on Fuseki server?

ぃ、小莉子 提交于 2019-12-13 07:16:51
问题 Is it possible to configure the Fuseki server to run over HTTPS? Currently: http://mylinuxbox:3030/ <-- OK Desired: https://mylinuxbox:3030/ <-- results in error 回答1: AndyS's comments, which seem like they probably answer the question: here is a discussion about this on the jena users list for Fuseki v2 (development). For Fuseki1, you define it via the Jetty configuration setup. --jetty-config= Another way is to put a reverse proxy in and put Fuseki behind that. If you already know how to set

LinkedMDB SPARQL results with fewer results than expected?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 05:47:46
问题 Slide 14 of Ontology Alignment Discovery using Linked Open Data says that there are 50,603 actors in the LinkedMDB dataset. Using the following query, I get 2500. Who is wrong here?, Is there something missing in the query? Why do the slides count such a high number? This is the SPARQL query: select(count(distinct ?actors) as ?nActors) where { ?actors a <http://data.linkedmdb.org/resource/movie/actor> . } Results 回答1: Many public endpoints impose limits on queries in order to ensure that one

Generate an incremental SPARQL query

ε祈祈猫儿з 提交于 2019-12-13 05:24:15
问题 is there any way to generate a SPARQL query in a dynamic way? what I'm trying to do is some thing like this: if I have a DBpedia resource r1 and another DBpedia resource r2, this query SELECT * WHERE { <r1> ?pre <r2> } will return the predicate between the 2 resources and this query SELECT * WHERE { <r1> ?pre1 ?obj1 . ?obj1 ?pre2 <r2> } will return all the predicates and object between these two resources ( in two steps) and so on I'm trying to build this query in such a way that it will