levkhomich/semargl — pull request #22 by ansell (2013-05-23 05:06:29+00:00)
Title: Patches to migrate to Sesame-2.7.1

This Pull Request contains patches to migrate to Sesame-2.7.1

Most of the content for the pull request is targeted on avoiding collisions between the different versions of both the jena and xml libraries used by Jena and Clerezza in tests. The root cause seems to have been that during the update to Sesame-2.7.1, Maven pulled in an older version of xmlapis for testing through an unnecessarily broad test dependency on sesame-rio-compliance that disturbed the fine balance between clerezza which is still using hp-jena-2.6.4 and jena which is updated to the latest version, apache-jena-2.10.1, which have different requirements in terms of their compatible xerces/xalan/xmlapis versions.

By selectively pulling in the required sesame modules individually, managing the versions for the xml libraries, and overriding the xerces version in the clerezza module to backdate it as necessary, the balance seems to have been restored.

As part of the update, there were some changes necessary to the Sesame module to support the RDFaParserSettings, which include a reference to the Sesame RDFaVersion enumeration that needed to be mapped to the short constants that are used in semargl core.

As part of the update, the RepositoryConnection.add method became more strict with respect to datatypes by default, so there is also code to reduce the effects of these errors to make them non-fatal.

The code also uses the recently introduced Rio.parse method to make some code a little shorter.

It also makes SesameTestHelper.askModel more informative when there is an error, and more resilient to exceptions, but always returning the opposite of what is expected if it encouters an exception. Previously it returned false, which may have passed tests that were expecting false.