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

sttl.navlab.mapmap.rq Maven / Gradle / Ivy

#
# Transfom Mappings with variables ?location ?lon ?lat into a map
# Transformer is created with Mappings argument
# Transformer set Mappings into start template
# Start template in this case is: http://ns.inria.fr/sparql-template/navlab#mapper 
# Function xt:mappings() gets mappings from current st:mapper template query which is the start template
# 
#
prefix ft:  

template st:mapmap(?amap) {
    st:call-template(st:maplist, ft:mapper.html, ?list, ?text)        
} 
where {
    values ?amap {undef}
    bind (coalesce(st:call-template(st:link), "link undef") as ?text)

    {select ?amap (aggregate(distinct xt:list(?location, ?lat, ?lon)) as ?list)
    where {
        values ?amap {undef}
        values (?location ?lon ?lat) { unnest(?amap) }
    }}
    
    filter (xt:size(?list) > 0)
}






© 2015 - 2025 Weber Informatics LLC | Privacy Policy