sparql

Jena Sparql and construct

CONSTRUCT is an alternative SPARQL result clause to SELECT. Instead of returning a table of result values, CONSTRUCT returns an RDF graph. So running this query PREFIX : http://dbpedia.org/resource/ PREFIX onto: http://dbpedia.org/ontology/ CONSTRUCT { :France onto:anthem ?x } WHERE { :France onto:anthem ?x . } dont foget the < and...

SPARQL DISTINCT vs. REDUCED

What is the difference between DISTINCT and REDUCED in SPARQL? ...

jena ontology api

i'm new to jena and protege.i did some stuff with these. i have some problems:: 1) Do i need to use sparql query to get the ontology classes,subclasses,property and values? or can do it with owl-api? can u show me the way? 2) how to get the data property values? 3) how to i load the ontology that define in my local machine and access th...

How to get data type property values using SPARQL

I have created some sample ontology in protege.According to my ontology there is a class called person and which has sub class called Student.There are some student individuals(john,paul,marry,...). I have defined some data property called "email" and assigned their email addresses. Following query which is resulting all the individuals...

rdf-sparql PROBLEM

i need to get the property value of the rdfs file which was belongs to my ontology..it has kilometer property and the value of it is 12500.00.. i need to get this value.... in my rdfs file there is no URI.... CAN ANY ONE SHOW ME THE WAY FOR DO THIS:::: ...

Jena Effects of Different Entailment Regimes

I am trying sparql and the use of entailment. As a example i used http://www.w3.org/TR/2010/WD-sparql11-entailment-20100126/#t112 i try to put them in jena. OntClass book1= model.createClass(NS+"book1"); OntClass book2=model.createClass(NS+"book2"); OntClass book3=model.createClass(NS+"book3"); OntClass publicatio...

How to get object properties of specific class in SPARQL

hi, I have some ontology(campus.owl).There are tree classes(Student,Sport,Lecturer).Student class is joined with Lecturer class using "has" object property and Student class joined with Sport class with "isPlay" object property. problem I want to get the object property between Student and Lecturer using some SPARQL query. PREFIX rdf...

how to get individual(s) for given class/individual with given object property using SPARQL

hi, I have simple ontology called "campus.owl".There is a class called"Lecturer" and which has two sub classes ,RegularLecturer and VisitingLecturer.There is a another class called "Student" which is a sibling class of Lecturer class. I have created individuals for all the classes. Student class is joind with Lecture class with "has" ob...

SPARQL querying

I have a problem with a SPARQL query engine called "TWINKLE" . Although i found the executible file and it was working perfectly , I failed to find any manual on the net about the usage of TWINKLE. As I am new to the SPARQL querying , i need a bit of help on that regard. CAn anyone suggest how to get more info or help regarding this?? T...

SPARQL - what does it take to find an ontology?

Hi. I'm pretty new to SPARQL, OWL and Jena, so please excuse if I'm asking utterly stupid questions. I'm having a problem that is driving me nuts since a couple of days. I'm using the following String as a query for a Jena QueryFactory.create(queryString), queryString = "PREFIX foaf: <http://xmlns.com/foaf/0.1/&gt;"+ "PREFIX ho: <http:...

SemWeb - How to get my query result in xml?

Hi I'm trying to use SemWeb library to make my SPARQL queries on an remote SPARQL endpoint. this is what i'm using fort testing, since this is an example that came with Semweb SparqlHttpSource source = new SparqlHttpSource("my_endpoint"); source.RunSparqlQuery("SELECT * WHERE {?entity dcterms:title 'someentity' }", new SparqlXmlQuery...

How to use logical OR in SPARQL regex()?

I'm using this line in a SPARQL query in my python program: FILTER regex(?name, "%s", "i" ) (where %s is the search text entered by the user) I want this to match if either ?name or ?featurename contains %s, but I can't seem to find any documentation or tutorial for using regex(). I tried a couple things that seemed reasonable: FILT...

Sparql skos:broader help

Hey guys, I'm doing a sparql query on the dbpedia set, but I am having some issues (due to lack of detailed sparql knowledge) with a query limition: I first 'get' all music artists: ?person rdf:type http://dbpedia.org/ontology/MusicalArtist . But I want to limit this to the broader category "Category:American_musicians" (via traversi...

Querying Project Gutenberg catalog.rdf via SPARQL

Hello. I'm having difficulty structuring a SPARQL query for the Project Gutenberg catalog (available at Gutenberg Feeds toward the bottom of the page). I know it is a fundamental lack of understanding on my part of how SparQL/RDF/etc. actually work, conflating it with SQL, etc. But I've tried several tutorials, and I just can't quite ...

Translate JSON MQL queries into SPARQL

Hi, I have a punch of JSON MQL queries to query Freebase. Is there a tool to translate them into SPARQL to use them with OpenRDF Sesame? Thanks! ...

How do I query/update a remote RDF-endpoint with Jena

I would like to send updates to a remote endpoint over http. I have found that joseki serves as such an endpoint. However, how do i send update queries to this endpoint, if I only know the uri of the endpoint? // To do a select-query you can use this: QueryExecution qe = QueryExecutionFactory.sparqlService(serviceURI, query); // (Side...

Extracting information from a SPARQL query using regular expressions

I am having a hard time creating a regular expression that extracts the namespaces from this SPARQL query: SELECT * WHERE { ?Vehicle rdf:type umbel-sc:CompactCar ; skos:subject <http://dbpedia.org/resource/Category:Vehicles_with_CVT_transmission&gt;; dbp-prop:assembly ?Place. ?Place geo-ont:parentFeatu...

Is it possible to query AllegroGraph using roqet?

I am trying to query AllegroGraph 4.0 using roqet to extract data in CSV. Is it possible? In roqet man page it is not clear if it can query a triple store besides rdf files. About AG HTTP protocol: http://www.franz.com/agraph/support/documentation/v4/http-protocol.html#header2-270 About roqet: http://librdf.org/rasqal/roqet.html Hello...

Neo4j vs OpenLink Virtuoso

I've been using OpenLink Virtuoso as an RDF store for some time now and although it's great with large data, I'm not satisfied with the graph traversal performance using SPARQL. Recently I've heard a lot about Neo4j's traversal performance and thought it's worth a try. So, for the purpose of having a large RDF store with good traversal ...

how do i determine if a specific triple exists using sparql?

so, if the data set is: @prefix dc: <http://purl.org/dc/elements/1.1/&gt; . @prefix : <http://example.org/book/&gt; . @prefix ns: <http://example.org/ns#&gt; . :book1 dc:title "SPARQL Tutorial" . :book2 dc:title "The Semantic Web" . how do i check that the triple :book1 dc:title "SPARQL Tutorial" . exists? i can do SEL...