x.jenax-arq-algebra.5.2.0-1.source-code.udf-inferences.rq Maven / Gradle / Ivy
The newest version!
# Derive class o:UserDefinedFunction from o:simpleDefinition
PREFIX o:
INSERT {
?s a o:UserDefinedFunction
}
WHERE {
?s o:simpleDefinition []
}
# Expand convenience list-based prefix mappings
# Note, this also works without a local name, as in ("ns2" foo:)
#PREFIX o:
#INSERT {
# ?s
# o:mapping [
# o:prefix ?ns ;
# o:iri ?iri
# ]
#}
#WHERE {
# ?s o:ns (?ns ?iri)
#}
# Expand convenience list-based function definitions
PREFIX rdf:
PREFIX o:
INSERT {
?s
o:definition [
o:expr ?e ;
o:params ?pl
]
}
WHERE {
?s
a o:UserDefinedFunction ;
o:simpleDefinition [
rdf:first ?e ;
rdf:rest ?pl
]
}
# Attach a prefixSet on the function level to all definitions without prefixes
PREFIX o:
PREFIX sh:
INSERT {
?d sh:prefixes ?ps
}
WHERE {
?s
a o:UserDefinedFunction ;
sh:prefixes ?ps ;
o:definition ?d
FILTER(!EXISTS { ?d o:prefixSet [] })
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy