Skip to content

VIVO 3838: Upgrading to 4

backups requested to merge github/fork/TAMULib/3838-alignment-jena_4 into jena4-upgrade

Created by: kaladay

This is a draft of incomplete fixes that are provided as a PR for easier consumption of another developer to pick up where I am leaving off.

This is not intended to be merged as-is and will eventually be closed rather than merged into the target branch. Consider using the branch represented by this Draft PR as a starting point.

The state of these changes:

  • This is based off of https://github.com/vivo-project/Vitro/pull/374 in expectation of that code being merged into the jena4-upgrade branch (This will be easier to review once that PR is merged).
  • Jena 4 is upgrade to 4.7.0.
  • This uses DatasetFactory.createGeneral() as a replacement to the once deprecated and now removed DatasetFactory.createMem().
  • The DatasetFactory.createTxnMem() cannot be used without further design changes as several tests fail and there appears to be a performance loss.
  • Several methods were removed and a few were added as necessary (some being empty stubs).
  • Some lost functionality had to be re-created in a small number of cases.
  • There are incidental code refactor changes.
  • Currently only a handful of tests fail with all of the remaining passing.
  • This has been confirmed to run, populate, and work (without extensive testing).
  • Given the test failures, there is an expectation of problems that are not observed with minimal startup and click testing.

Some of the incidental refactor code changes happened due to trying to cross reference the current implementation and the upstream class being overriden. I found it easier to just make the files identical and scroll up and down each until everything being overwritten matches. I added comments breaking up such files for easier comparison.

The following are some observations regarding on of the failing tests.

The recomputeABox1 test from SimpleReasonerSameAsTest is failing. The problem appears to be associated with ABoxRecomputer.

I observed a problem where after the recompute is performed the data in the inference becomes incorrect.

The data is looking like:

http://test.vivo/b @owl:sameAs http://test.vivo/b;

When instead the data should look like:

http://test.vivo/b @owl:sameAs http://test.vivo/a;

The entire inference before recomputing looks like:

{
  http://test.vivo/a @rdf:type owl:Thing;
  http://test.vivo/a @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing;
  http://test.vivo/d @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing;
  http://test.vivo/c @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing;
  http://test.vivo/b @owl:sameAs http://test.vivo/b;
  http://test.vivo/b @rdf:type owl:Thing;
  http://test.vivo/b @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing
}

After recomputing, the data looks like:

{
  http://test.vivo/a @rdf:type owl:Thing;
  http://test.vivo/a @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing;
  http://test.vivo/d @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing;
  http://test.vivo/c @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing;
  http://test.vivo/b @owl:sameAs http://test.vivo/b;
  http://test.vivo/b @rdf:type owl:Thing;
  http://test.vivo/b @http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType owl:Thing
}

Consider reviewing the individual commits as they may have further details regarding that given change set.

Merge request reports