A Novel Approach for Generating SPARQL Queries from RDF Graphs