Fully working Java sample with SPARQL