Support SERVICE in SOQL/Criteria API
Federation is a big Use Case for SPARQL, so JOPA should support the SPARQL SERVICE keyword within SOQL/Criteria API.
Similar to #218, this is a completely new query feature and its syntax need to be carefully considered. Ideally, both the SERVICE and the OPTIONAL keyword follow the same Syntax.
One proposal for a common Syntax could be the following:
SELECT p FROM Person p WHERE SERVICE :service ( p.username = :uname )
And for OPTIONAL:
SELECT p FROM Person p WHERE OPTIONAL ( p.username = :uname )
Where braces wrap one or multiple Axioms, similar to the resulting SPARQL.
Braces would be required for the SERVICE and OPTIONAL keywords to avoid disambiguate statements where it isn't clear which statements are affected by the keywords.
The SERVICE keyword would also require another parameter before the statements wrapped in brackets (e.g. :service) to actually set the URL of the Service to talk to
Besides SERVICE, GRAPH is another SPARQL keyword with virtually the same syntax and similar functionality. Even though a graph can be specified by a Descriptor passed to the query, it is applied only to loading result entities, it does not influence the query execution.