EvaBlomqvist (Talk | contribs) |
EvaBlomqvist (Talk | contribs) (→Reengineering and Refactoring using Semion) |
||
Line 28: | Line 28: | ||
Start Semion from the commandline as follows (from the directory where you unpacked Semion): | Start Semion from the commandline as follows (from the directory where you unpacked Semion): | ||
+ | Mac: | ||
java -jar -Xmx512m -XstartOnFirstThread it.cnr.istc.semion.tool-0.6-SNAPSHOT.one-jar.jar | java -jar -Xmx512m -XstartOnFirstThread it.cnr.istc.semion.tool-0.6-SNAPSHOT.one-jar.jar | ||
+ | |||
+ | Windows: | ||
+ | java -jar -Xmx512m 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, the following procedure lets you do the first syntactical transformation (reengineering): | ||
Line 44: | Line 49: | ||
* In the Project Explorer, under your datasource, and the Alignment subcategory, you alignment should now appear. Double click on it to open its related tab. | * In the Project Explorer, under your datasource, and the Alignment subcategory, you alignment should now appear. Double click on it to open its related tab. | ||
* In the overview you can see any annotations related to the ontology you have chosen to align to. And in the SPARQL tab you can query your alignment, however, currently it is empty. Instead go to the Alignment Rules tab. This is where you can now create your alignment, i.e. the transformation rules that brings the data from the RDF model of your database into something expressed using the FOAF model instead. | * In the overview you can see any annotations related to the ontology you have chosen to align to. And in the SPARQL tab you can query your alignment, however, currently it is empty. Instead go to the Alignment Rules tab. This is where you can now create your alignment, i.e. the transformation rules that brings the data from the RDF model of your database into something expressed using the FOAF model instead. | ||
− | * First we want to identify all the persons in the database and set them as instances of FOAF person. | + | * First we want to identify all the persons in the database and set them as instances of FOAF person. |
=== Using D2R === | === Using D2R === |
Tutorial | Training:Advanced Ontology Engineering at FOI - 2011 |
---|---|
Title | Reengineering |
Solutions:
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):
Mac: java -jar -Xmx512m -XstartOnFirstThread it.cnr.istc.semion.tool-0.6-SNAPSHOT.one-jar.jar
Windows: java -jar -Xmx512m 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):
Then click Finish.
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.