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

sttl.datashape.core.closed.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.

The newest version!
#
#  ?ls is the list of target nodes of shape ?sh
#  evaluate closed sh:constraint
#
prefix sh:  

template (?shape, ?sh, ?vis, ?ls) {
   sh:safe(?shape, ?sh, ?suc)
}
where {
  graph ?shape {
    ?sh sh:closed true 
    optional { ?sh sh:ignoredProperties ?skip }
  }

  values ?s { unnest(?ls) }

  ?s ?p ?o
   
   bind (
                     exists { graph ?shape { ?sh sh:property [ sh:path ?p ]} }
    ||
    (bound(?skip) && exists { graph ?shape { ?skip rdf:rest*/rdf:first ?p } })
    
   as ?suc)
   
   bind (st:report(sh:closed, ?sh, ?shape, ?s, ?p, ?o, ?suc, ?vis) as ?b)
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy