Is there any way to validate/check an SparQL query?
I'm asking for a a method simillar to oneClass.validateSparqlQuery(expectedSparQL)
.
And not forcing the exception "QueryException" while creating the SparQL, this way:
import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryException;
import com.hp.hpl.jena.query.QueryFactory;
public class myClass {
public static void generic(String expectedSparQL) {
try {
Query q = QueryFactory.create(expectedSparQL);
} catch (QueryException qe) {
//do something if the expectedSparQL is not correct
}
}
}
javadoc: https://jena.apache.org/documentation/javadoc/arq/index.html