There's a migration plan that was done with the help of Marmotta's community to move from Sesame 2.7 to RDF4J. The detailed plan is in the proposal sent to GSOC 17. Basically, there are three versions to move forward, starting with Sesame 2.7.16 to version 2.8.11. After that, we'll go to Sesame 4, and finally to RDF4J. Between versions, there were many code changes, versions problems, tests were broken, package problems, classes problems, and so on. So, what I'd like to do here is provide a quick summary of the changes done in Marmotta and how we accomplished to get to RDF4J.
Road to Sesame 2
3. Adopt a new convention by Sesame 2.8 that literals are data typed, so xsd:string or rdf:langString must be assigned if the type is null. Also, null contexts are allowed. These changes solve MARMOTTA-39.
4. Hash code of literals includes language and datatype, and it's not necessary to calculate different hashes for objects.
5. Solve a problem when comparing sizes before commit. There was an error while adding two equally statements, but do not commit the last addition. The result should be 1, but instead, show 2 results. This was because the getSize() method returned database size + a batch, and because these two statements were the same, the result was 2 instead of 1.
6. Some of the new tests showed some errors with subselect in an optional statement. This could be related with MARMOTTA-603
Road to Sesame 4
4. Get use of AbstractValueFactory for value factory extension.
7. Deal with Optionals in literal
8. Statement hashes are generated with contexts, and the hash code of literals are generated only with the label; does not include language and datatype.
9. Do not auto-registry functions since due they are registered with the ServiceRegistry.
10. There's a problem with KiWi; it was not built for special literals like +inf, -inf or NaN.
11. The dependency jsonld-java-sesame is now included Sesame 4 in the dependency sesame-rio-jsonld.
12. Moving to Java 8.
Road to RDF4J
1. Change package names.
2. LDP is working, but tests are ignored because an alternative LDP test suite should be found.
4. Replace deprecated classes and methods.
5. Upgrade JUnit to version 4.12.
6. Ignore test that loads a huge dataset.
Well, to finish I'd like to give some final thoughts. I've test Marmotta with H2 and PostgreSQL, and it's fully functional and tests are working too; dont forget to use JDK 8. If you are a skeptic and wanna try on your own, please clone MARMOTTA-659 branch. This is only a summary of the main things that have been done in Marmotta to upgrade to RDF4J–it looks easier than it actually was. After this, I learned a lot of how Marmotta is built in its core, and I would love to continue contributing. Finally, I want to list some things that I think it must be done.
1. After merging into develop branch, MARMOTTA-39 should be closed.
2. Some new tests in Sesame showed some falls with KiWi, so take a look to MARMOTTA-603.
3. Special values like +inf, -inf or NaN should be considered.
4. Find an alternative to LDP test suite.
5. Deal with deprecated dependencies and experimental backends (this could be solved with the last edit).
6. Decide if the test that load a big dataset should be ignored.
7. There's some modules that Sesame words, so IHO they should be changed to RDF4J.