kbss-cvut / jopa

Java OWL Persistence API
https://github.com/kbss-cvut/jopa/wiki
GNU Lesser General Public License v3.0
35 stars 16 forks source link

Support SERVICE in SOQL/Criteria API #290

Open luxbe opened 1 week ago

luxbe commented 1 week ago

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.

luxbe commented 1 week ago

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