-
Notifications
You must be signed in to change notification settings - Fork 21
Getting started
-
Dowload and extract the latest release of the R2RML Parser tool.
-
Modify the properties file (r2rml.properties by default, but you can define your properties using the
-p
command line option, e.g../r2rml-parser.sh -p my.properties
). Here you can configure almost anything, without altering the source code. The most important properties are the following:mapping.file: The R2RML mapping file that defines how the mappings will be materialized. Make sure you provide valid SQL queries and respect R2RML syntax.
source database connection properties ( db.url, db.login, db.password, db.driver ).
In case of exporting as an RDF file on the hard disk:jena.destinationFileName: The file that will contain the output in RDF, based on the mapping file and the source database.
jena.storeOutputModelUsingTdb: Has to be set to true when the target model is serialized using Jena TDB.
jena.tdb.directory: If property jena.storeOutputModelUsingTdb is set to true, this property defines the directory where the target model will be serialized
-
Execute r2rml-parser.bat (r2rml-parser.sh in linux, do not forget to run
chmod +x r2rml-parser.sh
before execution).
-
Install git (https://git-scm.com/). Optionally a git client with a GUI (e.g. https://desktop.github.com/ or any of the free available).
-
Clone the repository locally (
git clone https://github.com/nkons/r2rml-parser.git
orgit clone [email protected]:nkons/r2rml-parser.git
). -
Install a Java JDK (a JDK, not a JRE, as it is needed by Maven to compile the code).
-
Use an IDE. I would recommend Eclipse. It also has a git client. Conveniently, it also has an embedded Maven runtime.
-
Import the project into Eclipse (File -> Import -> Existing Maven projects).
-
From Eclipse, compile and run the project using mvn package: Right click on project head -> Run as -> Maven build... -> package (in the Goals textbox).
-
Once this finishes, the folder "target" will contain your version of the tool, which you will be able to execute via the command line. Alternatively, you can run the project from within Eclipse by right clicking on Main.java -> Run as -> Java application.
In the iswc folder you will find:
- an sql export of a postgres database (iswc-postgres_dump.sql),
- a mapping file (iswc-mapping_test.rdf), and
- an rdf dump (iswc-dump.rdf) of the database contents, produced when the mapping file is run against the database.