I have built a simple webpage as the frontend user interface for users to enter the sparql query. I am using Jena ARQ as the backend (I am using Grails) sparql query engine. Currently, users can only enter a "Select" query and I use:
ResultSet results = qexec.execSelect();
to execute the query and return the result. But now, I also want users to send Describe and Construct query from the same page to the backend. As has been discussed in this thread: Jena Sparql and construct, we need to use
Model results = qexec.execConstruct()
at the backend. So my question is, at the backend, how can I know if the query string is a Select query, a Describe Query or a Construct query, so that I can select from execSelect(), execDescribe() or execConstruct()? Is there anything I need to change for the frontend?