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

template.turtlehtml.rul 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











%s"    str(?uri) str(?title)
   }
}
where {
}
]]>











a %2$s", "%s %s")
    
	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
]]>























"
   
}
where {
  
  bind ( replace(str(?pr), "\n", "\\\\n") as ?b ) 
}
]]>











%s"
	
        ?in
	}
}
where {

}
]]>





%s", replace(?lit, "\\\\n", "\n"))
}
  
function st:blank(?in){
  st:format(
    "%s", 
    st:id(?in), st:apply-templates(?in))
}

function us:puri(?in){
    if (st:get(st:hyperlink, true),    
        st:display(?in), us:uri(?in))
}

function us:uri(?in){
    st:clean(st:turtle(?in))
}

function st:id(?in){
  coalesce(
    concat("it", st:vget(?in, st:id)), 
    concat("ab", st:index()))
}
      
function st:default(?in) {
   st:turtle(?in)
}



# LOD URI hypertext link generated as is 
# set by profile.ttl : st:param [ st:lod (URI) ]
#
function st:lod(?x){
     coalesce(mapany(rq:strstarts, ?x, st:get(st:lod)), false)
}
    

# display resource uri
function st:display(?x){
    let (?profile = coalesce(st:get(st:profile), st:null)){
      if (?profile = st:null){ 
        us:uri(?x) 
      }
      else if (st:lod(?x) || coalesce(st:getprofile(?x) = st:lod, false) ){
        st:call-template(st:link, ?x, us:uri(?x))
      }
      else {
        st:call-template(st:link, coalesce(st:pplink(us:prepare(?x)), us:prepare(?x)), us:uri(?x))
      }     
    }
}

function us:prepare(?uri){
    ?uri
#    coalesce(funcall(st:get(st:prepare), ?uri), ?uri)
}



function st:display2(?x){
    let (?profile = coalesce(st:get(st:profile), st:null)){
      if (?profile = st:null){ 
        st:call-template-with(st:sparql, st:esc, ?x) 
      }
      else if (st:lod(?x) || coalesce(st:getprofile(?x) = st:lod, false) ){
        st:call-template-with(st:sparql, st:linkesc, ?x)
      }
      else {
        st:call-template-with(st:sparql, st:linkprofile, ?x)
      }     
    }
}
]]>











", "")
  ?in 
  if (st:visited(?in), "", "")      
     
ibox { 
	st:nl()
	st:call-template(st:value, ?in)
} 
            
" ."      
}
where {
  ?in ?p ?y   
  filter isUri(?in)
}
limit 1
]]>














© 2015 - 2025 Weber Informatics LLC | Privacy Policy