changed sparql query to handle literals
Merge pull request #77 from ajstanley/7.x

changed sparql query to handle literals