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

template.dsresult.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.

The newest version!






 
template st:start {
    st:call-template(st:main)
}
where {
    
}
]]>






prefix ft: 

template st:title {
    format {
        ft:title.html
        
        st:get(st:service)
        
        if (! ?text, coalesce(st:get(st:param), st:get(st:rdf), ""), "")
        if (! ?text, coalesce(st:get(st:mode),  st:get(st:schema), ""), "")  
        
        if (?text,   coalesce(st:get(st:param), ""), "")
        if (?text,   coalesce(st:get(st:mode), ""), "") 
        
        ?title ?comment
    } 
}
where {
   bind (st:get(st:format) as ?format)
   bind (bound(?format) as ?text)
   bind (coalesce(st:get(st:title), "Shacl") as ?title) 
   bind (coalesce(st:get(st:comment), "")    as ?comment)
}


]]>






 
template st:main {
    st:call-template(st:title)
    st:call-template(st:shape)
    st:call-template(st:index)
    
    st:call-template(st:show)

    #st:apply-templates-with-graph(st:hturtle, ?g)
}
where {
    #bind (st:get(st:param) as ?par)
    bind (st:visitedGraph() as ?g)
    #filter bound(?par)
}
]]>






 
template st:index {
    format {
        "

%s: %s

" strafter(?s, sh:) ?c } } where { select ?s (count(*) as ?c) where { graph st:visitor { ?x a sh:ValidationResult ; sh:resultSeverity ?s } } group by ?s order by ?s } ]]>
template st:detail { format { """
%s
%s
""" if (exists { ?s ?p ?o }, st:apply-templates-with(st:turtlehtml, ?s), str(?s)) group { st:apply-templates-with-graph(st:turtlehtml, st:visitor, ?r) ; separator = "\n" } } } where { graph st:visitor { ?r sh:focusNode ?s } } group by ?s order by ?s ]]>
template st:shape { format { "

Validation Result: %s

" ?c } } where { {select (count(*) as ?c) where { graph st:visitor { ?x a sh:ValidationResult } }} filter (?c > 0) } ]]>
prefix doc: prefix ft: prefix tt: template st:show { format { ft:show.html st:apply-templates-with-graph(st:hturtle, st:shape) #st:apply-templates-with-graph(st:hturtle, st:visitor) st:apply-templates-with-graph(tt:startshape, st:visitor) st:apply-templates-with(st:hturtle) } #st:apply-templates-with-graph(, st:shape) } where { } ]]>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy