[GSoC]Automatically generated mapping and RDF model

0

Posted by myr | Posted in Bedroom | Posted on 03-06-2009

I managed to use Derby with the D2RQ Platform and now I’ve got a mapping file (mapping between ontology and relational data model, containing statements written in the “D2RQ Mapping Language”) and a schema, that have been both automatically generated by the D2RQ platform proper scripts. I created a sample Java project to print data taken from the virtual read-only RDF graph, created over the relational databases by the D2RQ engine thanks to the mapping file. In fact the D2RQ engine uses the mapping file to rewrite Jena API calls to SQL queries against the database and passes query results up to the higher layers of the frameworks. That sample project comprehends calls to the Jena’s model, Jena’s Graph API and to the Jena’ARQ engine to process SPARQL queries.
The automatic generation of the mapping file required a username and password to access the database and then I set them for the sensorbase db even if they were not originally required, adding the following lines to the derby.properties file:

derby.database.propertiesOnly = true
derby.connection.requireAuthentication=true
derby.database.defaultConnectionMode=fullAccess
derby.database.fullAccessUsers=myrtill
derby.database.sqlAuthorization=true
derby.user.myrtill=passw3084

Then those username and password have been utilized in the mapping file to access the sensorbase db.
I uploaded my own project to the Subversion server provided by the Google code hosting service. Use this command to anonymously check out the latest project source code:

# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://hackystat-linked-sensor-data.googlecode.com/svn/trunk/ hackystat-linked-sensor-data-read-only

Now I have to perform changes over the mapping file to make it follow the planned RDF schema. Firstly I have to change the following lines in the mapping file:

map:SENSORDATA_SDT a d2rq:PropertyBridge;
d2rq:belongsToClassMap ;
d2rq:property vocab:SENSORDATA_SDT;
d2rq:propertyDefinitionLabel “SENSORDATA SDT”;
d2rq:column “APP.SENSORDATA.SDT”;

I must understand how to insert as the object of a triple, the uri common to every SDT class(Build, Cli, Dependency,etc.) concatenated with the literal value of the d2rq:column “APP.SENSORDATA.SDT” (instead of simple the value of that column), setting “rdf:type” as the predicate instead of “vocab:SENSORDATA_SDT”.
I’ll create an image representing the automatically generated schema, to make clearer the difference between it and the planned one.