template.logger.rul Maven / Gradle / Ivy
template st:map(?jsonlist) {
st:call-template-with(st:navlab, st:maplist, ft:map.html, ?list, "")
}
where {
bind (us:location(?jsonlist) as ?list)
}
]]>
Server Log"
st:call-template(st:map, ?jsonlist)
st:call-template(st:chart, ?jsonlist, "country")
#st:call-template(st:chart, ?jsonlist, "org")
}
where {
# list of json descriptions of IP address
bind (us:jsonlist() as ?jsonlist)
}
]]>
value
# generate a JSON SPARQL Result format for graphic chart
#
template st:json(?table) {
format {
"""{
"head": { "vars": [ "x", "c"] },
"results": { "bindings": [
%s
]
}
}
"""
group {
format {
"""{
"x": { "type": "literal", "value": "%s"},
"c": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "%s"}
}"""
?key ?value
}
; separator=',\n'
}
}
}
where {
select * where {
values ?table { UNDEF }
values (?key ?value) { unnest(?table) }
}
order by desc(?value) ?key
}
]]>
template st:chart(?jsonlist, ?key) {
format {
d3:frameselect.html
?id
coalesce(?json, "{ error: 'error when reading st:mappings'}")
}
}
where {
bind (substr(replace(rand(), "\\.", ""), 0, 5) as ?id)
bind (us:nbmap(?jsonlist, ?key) as ?table)
bind (st:call-template(st:json, ?table) as ?json)
}
]]>
template st:profile {
}
where {
}
]]>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy