A Java utility for querying a relational database (e.g. MySQL db) via a SPARQL endpoint exposed by the virtual RDF graph created for the relational database. The virtual RDF graph is loaded into the GUI with the help of a mapping file which serves as the schema for the graph. A screenshot of the interface with different parts labelled:
- Linux or Mac OS
- Java 7 or later
Virtual SPARQLer relies upon the D2RQ tool to emulate the RDF-based querying environment. Therefore, the application is packed along with the D2RQ tool. To start using, download the archive and follow the instructions below.
-
extract the archive and keep the contents of the archive in the same directory,
tar -xvzf VirtualSPARQLer.tar.gz
-
start the program by executing the JAR file in "target" directory, you will see a plain interface unlike the above,
chmod +x Virtual-Sparqler-1.0-jar-with-dependencies.jar
java -jar Virtual-Sparqler-1.0-jar-with-dependencies.jar
-
load the HBP database by selecting option "Open Mapping" from the user interface and selecting an existing mapping file (mapping.ttl) for HBP database located in folder "d2rq-0.8.1" (see screenshot 1),
-
once the mapping file is loaded, the left panel of the interface is loaded with resources on top and properties at bottom (see screenshot 2),
-
start querying the HBP database by simple writing simple SPARQL queries,
e.g. SELECT * { <hbp_drugs/donepezil> ?p ?o}
-
if there is an updated version of the database, choose "New Connection" option instead,
-
provide the credentials of the database in the window popped up and test the connection (see screenshot 3),
-
once successful, a new mapping file is created in the user's home directory,
-
load the new mapping file using "Open Mapping" option and start querying the new RDF graph,
-
the query results are displayed in the "Results" section of the interface, to save the results, click on Save and choose one of the five different output formats (TXT, XML, JSON, CSV, TSV).
Virtual SPARQLer features the following advantages over the traditional RDF based SPARQL endpoints.
-
Avoids the duplication of data in the database by creating new RDF dataset.
-
Computational cost is really low.
-
Output can be saved in various formats facilitating easy visualiztion.
screenshot 1:
screenshot 2:
screenshot 3:
For questions or collaborations, contact me ([email protected]).