sttl.sparql.profile.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.
template st:profile {
}
where {}
function us:format(?name) {
st:getFormat("sparql", ?name)
}
# LOD URI hypertext link generated as is
# set by profile.ttl : st:param [ st:lod (URI) ]
#
function st:lod(?x){
coalesce(mapany(rq:strstarts, ?x, st:get(st:lod)), false)
}
# display resource uri
function st:display(?x){
let (?profile = coalesce(st:get(st:profile), st:null)){
if (?profile = st:null){
st:call-template(st:esc, ?x)
}
else if (?profile = st:std){
st:call-template(st:linkesc, ?x)
}
else if (st:lod(?x) || coalesce(st:getprofile(?x) = st:lod, false) ){
st:call-template(st:linkesc, ?x)
}
else {
st:call-template(st:linkprofile, ?x)
}
}
}
function st:init(){
if (coalesce(st:get(st:service), st:null) = st:null){
st:set(st:service, "/template")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy