Training:Advanced Ontology Engineering at FOI - 2011/Reengineering

From Odp

(Difference between revisions)
Jump to: navigation, search
Line 25: Line 25:
Your task is to use Semion to express this data in terms of the FOAF vocabulary, at the following URI: http://xmlns.com/foaf/0.1/
Your task is to use Semion to express this data in terms of the FOAF vocabulary, at the following URI: http://xmlns.com/foaf/0.1/
 +
 +
Start Semion from the commandline as follows (from the directory where you unpacked Semion):
 +
 +
java -jar -Xmx512m -XstartOnFirstThread it.cnr.istc.semion.tool-0.6-SNAPSHOT.one-jar.jar
 +
 +
When the tool starts, the following procedure lets you do the first syntactical transformation (reengineering):
 +
* When the tool starts you see the workspace on the left, with an example project called "test". Open the text project, and right-click on the "Data sources" icon.
 +
* Select "New", "Data source", and "Relational database".
 +
* In the dialogue that appears, give the database a name, e.g. "ISWC", and select the type "MySQL". Enter the host given above, and the port 3306. Database name and username according to above, and the password given to you on site. Finally, set a URI for your new data that will be the result of the reengineering, e.g. "http://example.org/myISWCdata/" and then click on "finish".
 +
* Double click on your new datasource in the Project Explorer, so that a tab appears to the right with information about the DB.
=== Using D2R ===
=== Using D2R ===

Revision as of 14:54, 3 October 2011

Tutorial Training:Advanced Ontology Engineering at FOI - 2011
Title Reengineering
Problem:

Exercise on reengineering DBs to OWL/RDF.

Solutions:

Reengineering and Refactoring using Semion

In this exercise you will use the Semion tool to reengieer a database table from an example database into RDF, and then to refactor it so that the data is expressed using the FOAF vocabulary.

The database:

host: mysql315.loopia.se

user name: d2r@o45820

password: (given at the course)

database name: ontology_se_db_2

Content: The database contains information about a past ISWC conference, and in one table called "persons" there is information about the people that organized or attended the conference.


Task 1:

Your task is to use Semion to express this data in terms of the FOAF vocabulary, at the following URI: http://xmlns.com/foaf/0.1/


Start Semion from the commandline as follows (from the directory where you unpacked Semion):

java -jar -Xmx512m -XstartOnFirstThread it.cnr.istc.semion.tool-0.6-SNAPSHOT.one-jar.jar

When the tool starts, the following procedure lets you do the first syntactical transformation (reengineering):

  • When the tool starts you see the workspace on the left, with an example project called "test". Open the text project, and right-click on the "Data sources" icon.
  • Select "New", "Data source", and "Relational database".
  • In the dialogue that appears, give the database a name, e.g. "ISWC", and select the type "MySQL". Enter the host given above, and the port 3306. Database name and username according to above, and the password given to you on site. Finally, set a URI for your new data that will be the result of the reengineering, e.g. "http://example.org/myISWCdata/" and then click on "finish".
  • Double click on your new datasource in the Project Explorer, so that a tab appears to the right with information about the DB.

Using D2R

Now, you should try to use D2R to instead create a runtime mapping to the DB, so that you can query the DB using SPARQL.

Task 2:

Use the same database as above, and run the following tutorial: http://sw.cs.technion.ac.il/d2rq/tutorial

The example data is already loaded into the database, but you have to edit the example mapping to reflect the details of the database above. Then you can run the D2R server (with the mapping file in the same directory) and try accessing the DB through SPARQL in your browser.

Personal tools
Quality Committee
Content OP publishers