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

sttl.spintc.template.bound.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
#
# TODO: subquery select var bind only var
#
prefix sp:  

template st:bound(?b, ?n) {
  ?suc
}
where {
     
   bind (
   (exists { ?b (sp:subject|sp:predicate|sp:object)/sp:varName ?n } ||
    exists { ?b a sp:Bind   ; sp:variable/sp:varName ?n } ||
    exists { ?b a sp:Values ; sp:variables/rdf:rest*/rdf:first/sp:varName ?n } ||
    exists { 
      ?b a sp:Select 
      { ?b sp:resultVariables/rdf:rest*/rdf:first/sp:varName ?n }
      union 
      { ?b sp:star true ; sp:where/(! sp:void)* ?bb
        filter (st:call-template(st:bound, ?bb, ?n))
      }
      }) 
    &&
    not exists { ?m a sp:Minus . ?m (!sp:void)* ?b }
   as ?suc)
   
   
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy