Validating Sparql queries

In our codebase we build some SPARQL programatically by gluing some chunks of text. In order to validate that the SPARQL queries are valid we have some integration tests that check that the queries don't raise any MalformedQuery exception but that requires connectivity to a Stardog instance.

Is there a way to parse and check for syntactic validation of Stardog's SPARQL queries that could allow converting those integration tests to unit tests in Java?

You may want to look at QueryFactory . It says that parsing could be done lazily but it's not clear if there's a way to make it do parsing eagerly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.