sttl.datashape.path.generic.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-core Show documentation
Show all versions of corese-core Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
#
# [] a sh:NodeShape ; sh:property ?sh .
# ?sh sh:path ?p ; ?q ?m .
# ?ls = list of subjects of path ?p
#
# ?value may be bound in the boolean cases:
# ?sh sh:path ?p ; sh:or ([sh:class C1][sh:class C2])
#
# template sh:or enumerate objects of path and
# for each object ?value : check the or
# the or evaluates its elements by coming back here with ?value bound
# this is done to use the same templates whether ?value is bound or not
#
prefix sh:
template (?shape, ?sh, ?vis, ?ls, ?p, ?value) {
sh:safe(?shape, ?sh, ?suc)
}
where {
graph ?shape {
values ?q {
sh:minLength sh:maxLength sh:datatype sh:minInclusive sh:minExclusive sh:maxInclusive sh:maxExclusive
sh:nodeKind sh:class
sh:in sh:languageIn sh:node sh:property
}
?sh ?q ?m
}
values ?s { unnest(?ls) }
values ?o { unnest(if (bound(?value), ?value, sh:path(?shape, ?s, ?p))) }
bind (coalesce(sh:functioncall(?q, ?shape, ?o, ?m), false) as ?suc )
bind (
if (?q in (sh:property), true, st:report(?q, ?sh, ?shape, ?s, ?p, ?o, ?suc, ?vis))
as ?b)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy