Trying to port RDFStore/SPARQL functionality