RDF & SPARQL 1.2 Interoperability
through Query Rewriting
Jitse De Smet  Â·  Maxime Jakubowski
QR code to the paper paper
The gap
  • RDF 1.2 adds triple terms: one native way to state metadata about a statement
  • Published data keeps its own reification pattern — rdf:Statement, n-ary, custom
  • A federation engine should bridge between different structures
Write SPARQL 1.2, then query the data you already have.
Mappings are just CONSTRUCT queries
1  Map the source onto the global schema
# rdf-reification → triple terms
CONSTRUCT { ?t rdf:reifies <<( ?s ?p ?o )>> }
WHERE { ?t a rdf:Statement ;
    rdf:subject ?s ; rdf:predicate ?p ;
    rdf:object ?o . }
# and pass everything else through
CONSTRUCT { ?s ?p ?o }
WHERE     { ?s ?p ?o }
2  Ask in SPARQL 1.2
SELECT * WHERE {
  ?t rdf:reifies <<( ?s rdf:type ?o )>> ;
     ex:confidence ?score .
  FILTER(?score > 0.8)
}
→
unfold
3  What the source actually gets
SELECT * WHERE {
  ?t a rdf:Statement ; rdf:subject ?s ;
     rdf:predicate rdf:type ; rdf:object ?o .
  ?t ex:confidence ?score .
  FILTER(?score > 0.8)
}
  • Extensiblenew schemes, no new code
  • Interpretableyou can read the mapping
  • Familiarit is just SPARQL
  • Portableany compliant engine
One rewriter, many mappings — all four ship as demo presets
reification
Standard reification
?st a rdf:Statement ;
  rdf:subject   ?s ;
  rdf:predicate ?p ;
  rdf:object    ?o .
n-ary
Statement nodes
?s  p:P31  ?st .
?st ps:P31 ?o .
beyond
Source selection
CONSTRUCT { ?s ?p ?o } WHERE {
  SERVICE <src> { ?s ?p ?o } }
beyond
Set-theoretic globals
{ …A… } UNION { …B… }
MINUS   { …C… }
QR code to the live demo
Live demo Write mappings, pick sources, watch the rewrite — Traqula transforms, Comunica executes 2026-query-rewriting.demo.jitsedesmet.be
Next
  • Beyond reification: general RDF-to-RDF mappings, formalised and optimised
  • Mappings we cannot yet write are input for SPARQL maintenance mode: CONSTRUCT GRAPH, triple-term templates, recursive views