I have this assignment where I have created an rdfs ontology with artists, their songs, their genres, etc using Protégé and populated it with some data. I am now supposed to connect my ontology and it's data with DBPedia's, so that I can SPARQL for my artists' birthdate. I have successfully imported http://dbpedia.org/ontology/ and http://dbpedia.org/property/ into protégé, but I can't find a way to import the data (http://dbpedia.org/resource/).
Can anyone point me in the right direction?
DBpedia datasets are stored and available for download here (http://wiki.dbpedia.org/Downloads2015-04#h96554-1) but Protégé isn't going to perform well (or at all) when you load a dataset of this size into it.
You may be better downloading various entities by hand such as - http://dbpedia.org/data/Blink-182.ntriples and then loading into Protégé. You can go to any DBPedia page. E.G. http://dbpedia.org/page/Ras_Barker and find download links at the bottom.
Related
Is it possible, to query the ontology alongside a virtual graph? I built a test project (Data tables in PostgreSQL - Ontology and mappings in Protege/w Ontop Plugin), and while querying via the Ontop Sparql Tab works fine, the answers only include triplets from the VKG, but triplets from the ontology do not show up. I tried the same in graphDB with an ontop style repository to no avail.
Thank you in advance!
Attila
I've been trying to figure out how to mount a SPARQL endpoint for a couple of days, but as much as I read I can not understand it.
Comment my intention: I have an open data server mounted on CKAN and my goal is to be able to use SPARQL queries on the data. I know I could not do it directly on the datasets themselves, and I would have to define my own OWL and convert the data I want to use from CSV format (which is the format they are currently in) to RDF triple format (to be used as linked data).
The idea was to first test with the metadata of the repositories that can be generated automatically with the extension ckanext-dcat, but is that I really do not find where to start. I've searched for information on how to install a Virtuoso server for the SPARQL, but the information I've found leaves a lot to be desired, not to say that I can find nowhere to explain how I could actually introduce my own OWLs and RDFs into Virtuoso itself.
Someone who can lend me a hand to know how to start? Thank you
I'm a little confused. Maybe this is two or more questions?
1. How to convert tabular data, like CSV, into the RDF semantic format?
This can be done with an R2RML approach. Karma is a great GUI for that purpose. Like you say, a conversion like that can really be improved with an underlying OWL ontology. But it can be done without creating a custom ontology, too.
I have elaborated on this in the answer to another question.
2. Now that I have some RDF formatted data, how can I expose it with a SPARQL endpoint?
Virtuoso is a reasonable choice. There are multiple ways to deploy it and multiple ways to load the data, and therefore LOTs of tutorial on the subject. Here's one good one, from DBpedia.
If you'd like a simpler path to starting an RDF triplestore with a SPARQL endpoint, Stardog and Blazegraph are available as JARs, and RDF4J can easily be deployed within a container like Tomcat.
All provide web-based graphical interfaces for loading data and running queries, in addition to SPARQL REST endpoints. At least Stardog also provides command-line tools for bulk loading.
I have created an ontology where I've imported a couple of external ontologies and mapped some of my classes to those in them. When I open the ontology in Protege, I see the classes that I created as well as the mapping to other ontologies.
However, when I open the ontology in a text editor or export it to Sesame, I only see the classes I created or mapped to those in existing ontologies. The ones I haven't touched do not show up. I need all the classes from the imported ontologies for my application. How do I get them to show up in my owl file?
UPDATE1
When I import these ontologies directly into Sesame, all the triples show up. This is in contrast to the case of importing these ontologies to Protege and then uploading the file to Sesame. In the latter case, the classes I haven't modified/mapped to those in my ontology don't show up.
What explains the difference in the behavior?
These are the ontologies I am concerned with:
http://svn.code.sf.net/p/vaccineontology/code/trunk/src/ontology/VO.owl
http://ovae.googlecode.com/svn/trunk/src/ontology/ovae.owl
Problem Definition: Store sensor data (temperature readings, sensor description) into rdf form using an ontoloy. Further, use SPARQL to perform queries on stored data.
My Approach: I am not an expert in this domain, but I have some basic understanding and accordingly I am using this approach: 1. Create Ontology, 2. convert data according to ontology vocabulary, 3. store converted data into triple store, 4. Perform SPARQL queries. I am not sure whether I am following the right way. Any comments from your side will be valuable.
Till now, I have done the following:
I have created an ontology in Protege 5.0.0 as for representing temperature sensor. This ontology only represents one part of full ontology.
I have collected data in a CSV file which includes date, time and temperature reading as shown as
Now, I want to use this ontoloy for storing the csv file in rdf form in some data store. At this step I am stuck from last three days. I have found some links like link1, link2 but still I am finding it difficult to proceed further. Do I need a script which will read csv file and perform mapping to given ontology concepts. If yes, is there a sample script which does the same? Possibly, outcome might look like:
<datetime>valX</datetime>
<tempvalue>valY</tempvalue>
Can anyone guide me in the following:
1. Am I taking correct steps to solve the problem?
2. How should I solve step 3, i.e, store data according to ontology.
P.S: I have posted this question on answers.semanticweb.com also. This is only to get the response asap.
actually, this is a great use of D2RQ mapping language, and D2RQ server.
Go install D2RQ, then start it up with a connection to your relational database. Then generate a mapping file using their generator that comes with the software. Then you'll have a mapping file -- edit that and swap out the automatically generated ontology prefixes with your own. Their website has a page that explains how the mapping language works.
Once you've done that and there are no errors in the mapping file, you can actually query your whole relational dataset with SPARQL without even having to export it and load it in a real triplestore.
However, if you want to export and load into a triplestore, you'd just run the D2RQ generate triples functionality (Also included in d2rq server), and then import that triples file into a triplestore like Jena Fuseki.
i'm new to semantic web.
I'm trying to do a sample application where i can query data from different data sources in one query.
i have created a small rdf file which contains references to dbpedia resources for defining localities. my question is : how can i get the data contained in my file and other information which is in the description of the distant resource (for example : the name of the person from the local file, and the total poulation in a city dbpedia-owl:populationTotal from the distant rdf file).
i don't really understand the sparql query language, i tried to use the JENA ARQ API with the SERVICE keyword but it doesn't solve the problem.
Any help please?
I guess you are looking for something like the Semantic Web Client Library, which tries to leverage the GGG. Albeit, the standard exploration algorithm of this framework is that it follows rdfs:seeAlso links. Nevertheless, the general approach seems to be what your are looking for, i.e., you would create a local graph that consists of your seed graph and that traverse the relations up to a certain level, e.g., three steps, resolves the URIs and load that content into your local triple. Utilising advanced technologies like SPARQL federation might be something for later ;)
I have retrived data from two different sources using SPARQL query with named graphs.
I used jena-ARQ to execute the sparql query.