All Downloads are FREE. Search and download functionalities are using the official Maven repository.

query.transitive.rq Maven / Gradle / Ivy

Go to download

Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1 Query and Update.

There is a newer version: 4.6.1
Show newest version
#
#  Check if a SPIN graph represent a transitive construct-where rule
#  Olivier Corby, Wimmics Inria I3S, 2014
#
select * where {   
  ?q a sp:Construct ;   
    sp:templates ([ sp:subject ?x ; sp:predicate ?p ; sp:object ?z ]) .   
  {   
  ?q sp:where (   
    [ sp:subject ?x ; sp:predicate ?p ; sp:object ?y ]   
    [ sp:subject ?y ; sp:predicate ?p ; sp:object ?z ])   
  }   
  union {   
  ?q sp:where (   
    [ sp:subject ?p ; sp:predicate rdf:type ; sp:object owl:TransitiveProperty, ?t]   
    [ sp:subject ?x ; sp:predicate ?p ; sp:object ?y ]   
    [ sp:subject ?y ; sp:predicate ?p ; sp:object ?z ])   
  }   
}   




© 2015 - 2025 Weber Informatics LLC | Privacy Policy