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

webapp.data.tutorial.process.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!
@prefix fun: <>

@trace 
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