JervenBolleman/sesame-loader — pull request #8 by ansell (2012-03-19 04:54:30+00:00)
Title: Decouple OWLIM and Native repositories from LoaderMain

This pull request splits up sesame-loader into a few different modules, including separate modules for the owlim and native repository managers so that people do not need to include these dependencies on their classpath to use LoaderMain.

The effect in LoaderMain is that now a separate RepositoryManagerFactory is registered for both the owlim and native repository managers, and the factories are discovered using java.util.ServiceLoader through META-INF/services/ files. The services files are written out using a compile time annotation @MetaInfServices() on the instances of the RepositoryManagerFactory interface, but the service files could also be manually created as necessary.

The java.util.ServiceLoader work is wrapped up in the RepositoryManagerFactoryRegistry class, which also has a test to verify that the two factories are loaded at runtime and accessible through the registry.

As part of the splitting into multi-modules, the script access sequence needed to change, so there are usage updates and documentation changes to the README to show how to use load.sh and load_owlim.sh. In future I think we should recommend that people use load.sh and load_owlim.sh instead of directly accessing the appassembler scripts so we can move them around if we need to.

In particular, these changes make it easy for me to add command line utilities to bigdata-sesameloader without linking to bigdata from sesame-loader. I am not yet sure what the best strategy is for bigdata and sesameloader, as per your recent comments.

I would like to load up relatively large files both programmatically and using the comment line and be able to switch between different implementations that way instead of hardcoding access to the different platforms, so it is nice in that way that three implementations are currently available. Even though any Sail or Repository can be used programmatically if they need a complex sequence of events like Owlim and Bigdata do it is nice to be able to write that up once as a sesameloader module and avoid having to write it again as much as possible.

I also bumped the sesame version from 2.6.3 to 2.6.4 to match the recent release.