
webapp.data.demo.hal.process.rq Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-server Show documentation
Show all versions of corese-server Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
The newest version!
@prefix fun: <>
select * where {}
@public {
#
# modify query string text, replace $pattern by appropriate code depending on value of st:get(st:mode)
# if URI of country in HAL contains space, replace it by underscore for DBpedia
# st:get(st:patternvalue) is the list of DBpedia URI which (may) contain space in HAL
# it is defined in profile.ttl tutohal
# st:get(st:mode) is the DBpedia URI select by user
#
function us:country(?q) {
xt:replace(?q, "$pattern", us:countryText())
}
function us:countryText() {
let (?text =
"""
bind ($mode as ?country)
bind (uri(replace(str(?country), "_", " ")) as ?cc)
?y vs:country-name ?cc
"""
) {
if (xt:member(st:get(st:mode), st:get(st:patternvalue)),
?text,
"?y vs:country-name $mode, ?country")
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy