gchq / MagmaCore

Magma Core is a collection of Java Classes and utilities to enable HQDM objects and patterns to be created and consumed as RDF Linked Data.
Apache License 2.0
26 stars 4 forks source link

Add support for RDF4J #176

Open twalmsley opened 9 months ago

twalmsley commented 9 months ago

This would have to be a database with a SPARQL endpoint that would hopefully work in a similar way to MagmaCoreRemoreSparqlDatabase that currently works with Apache Fuseki.

The main purpose of this task is to understand the problems that adding new databases might raise.

Some candidates are listed here

Happy for someone else to pick this up if I don't get to it in the next few weeks.

twalmsley commented 9 months ago

See here for some documentation on how to access GraphDB - needs RDF4J as well as Jena.

twalmsley commented 9 months ago

It's likely that adding RDF4J will be a requirement when supporting other database since several popular RDF databases support RDF4J, and it might be worth replacing the Jena in-memory and persistent databases with the RDF4J equivalents. The Fuseki service could still be provided either using Jena as it currently does or via RDF4J as instead. Some work is needed to see what's possible.

twalmsley commented 7 months ago

I started branch 176 and added the RDF4J SAIL in-memory-store and native-store databases which seem to be working, but I don't have time to add more at the moment, maybe in future.

One point of concern is that RDF4J wasn't playing nicely with the unit tests due to MagmaCore using Java9 modules and RDF4J not using them, so I disabled modules for unit tests as a stop-gap. This needs to be looked into more because it might also become an issue for production code as well as unit test.

I'll continue this if I find the time and motivation, but otherwise it is parked for now. If someone else would like to take it on then feel free!