The following tool generates an R2RML mapping that generates RDF according to the rules of a direct mapping. This tool allows you to either:
- Generate a mapping that you can subsequently use with an R2RML processor, or
- Generate and immediately execute the mapping with the this R2RML processor.
First, ensure that you have installed the following R2RML processor on your machine using mvn clean install
.
To build the project and copy its dependencies, execute
$ mvn package
$ mvn dependency:copy-dependencies
To generate a mapping, you can execute:
$ java -jar directmapping.jar \
--baseIRI http://www.example.org/my-db/ \
--connectionURL jdbc:mysql://localhost:3306/directmappingtest \
--user dmtest \
--password dmtest \
--mappingFile ./mapping.ttl
To execute a direct mapping, you can execute:
$ java -jar directmapping.jar \
--baseIRI http://www.example.org/my-db/ \
--connectionURL jdbc:mysql://localhost:3306/directmappingtest \
--user dmtest \
--password dmtest \
--outputFile ./output.ttl
When you execute the direct mapping without specifying a mapping file, the tool will create a mapping file in your machine's temp
folder. You can specify both a mapping and and output file. The format of both files is TURTLE. Consult $ java -jar directmapping.jar -h
for more information on the parameters.
This implementation of R2RML is written by Christophe Debruyne and released under the MIT license.