Refactoring because of JENA SPARQL API changes.