On 16/02/2021 19:00, Zak Mc Kracken wrote:
Hi Andy,
thanks for your reply.
I guess this requires a TDB endpoint, or is there any kind of SPARQL*
support for HTTP endpoints?
HTTP endpoint = Fuseki?
Not necessarily, I mean Jena used to query a remote SPARQL endpoint via
HTTP, whatever the server providing it.
There is no special support for SPARQL-star like use of another, plain
server.
I'm thinking of both the case where the remote endpoint has star
support, and the idea of translating SPARQL* constructs into patterns
based on the rdf: vocabulary (rdf:Statement, rdf:subject, etc).
No need - send a SPARQL-star query.
But, what if the endpoint doesn't support -star syntax? I'd expect a
syntax error.
yes.
I'm thinking that, in this case, it could be useful if
Jena could translate a pattern like:
<< ?s ex:pred ?o>> ex:meta ?so
into:
?stmt a rdf:Statement;
rdf:subject ?s;
rdf:predicate ex:pred;
rdf:object ?o;
ex:meta ?so.
RDF-star is not exactly the original RDF reification. You can do use it
for the same use cases but not in a simple replacement fashion.
RDF-star is a lower building block. And it can be misused (note: the
same problems occurs in plain RDF as well. It's a not-new modelling
problem).
In the data view:
All occurrences of the same << :s :p :o>> would need to be mapped to the
same single reification.
<<:s :p :o >> :validFrom "Monday" ;
:validTo "Wednesday" .
same reification subject node:
_:b0
rdf:subject :s;
rdf:predicate :p
rdf:object :o;
:validFrom "Monday" ;
:validTo "Wednesday" .
but if someone else says
<<:s :p :o >> :validFrom "Saturday" ;
:validTo "Sunday" .
_:b0
rdf:subject :s;
rdf:predicate :p
rdf:object :o;
:validFrom "Monday" ;
:validFrom "Saturday" ;
:validTo "Wednesday" ;
:validTo "Sunday" .
whish is gibberish.
It needs to be:
<<:s :p :o >> :valid [ :from "Monday" ; :to "Wednesday" ] .
<<:s :p :o >> :valid [ :from "Saturday" ; :to "Sunday" ] .
_:b0
rdf:subject :s;
rdf:predicate :p
rdf:object :o;
:valid [ :from "Monday" ; :to "Wednesday" ] ;
:valid [ :from "Saturday" ; :to "Sunday" ] .
The day ranges have been kept apart.
does Jena do the translation (data or query)? No.
could Jena do the translation (data or query)? Yes.
but it only works if the remote end has reification in the right shape
to match the mapping.
Andy
which would allow to send -star queries to plain SPARQL endpoints (yes,
with quite a deal of semantic assumptions).
(I have code that does RDF-star<->reification. There's an open JIRA
somewhere.)
interesting, you mean something like above?
Marco