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

sttl.turtlehtml.template.value.save 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.

There is a newer version: 4.6.1
Show newest version
#
# Turtle Pretty Printer
# Olivier Corby, Wimmics Inria I3S, 2013
#
template st:value {
             
   format {
    "%s %s"
	if (?p = rdf:type, "a", st:process(?p))  	       
	if (?refer, st:turtle(?y), if (isURI(?y) && ?y = rdf:nil, "()", st:process(?y)))
   }   
             
   ; separator = concat(" ;", st:nl()) 
}
where {
  ?in ?p ?y 
    
  bind (
    isBlank(?y) 
    && ( (st:isStart() && exists { ?x ?q ?y . filter(?in != ?x) })
         || exists { ?y ?q ?y } 
         || ?in = ?y
       )
  as ?refer)
    
}
order by if (?p = rdf:type, 0, 1) ?p ?y




© 2015 - 2025 Weber Informatics LLC | Privacy Policy