
sttl.turtle.list.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.
The newest version!
#
# Turtle Pretty Printer
# Olivier Corby, Wimmics Inria I3S, 2013
#
template {
"("
group {
if (?refer, st:turtle(?e), ?e)
; separator = "\n"
}
")"
}
where {
?in rdf:rest* ?r
?r rdf:first ?e
filter (?r != rdf:nil && not exists { rdf:nil rdf:rest* ?r })
bind (isBlank(?e) &&
((st:get(st:allgraph, true) && exists { ?x ?p ?e . filter(?x != ?r) })
|| exists { ?e ?q ?e })
as ?refer)
}
# after URI and blank
pragma { st:template st:priority 1000 }