Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PREFIX st: <http://ns.inria.fr/sparql-template/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX fun: <http://w3id.org/sparql-generate/fn/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX swrl: <http://www.w3.org/2003/11/swrl#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX iter: <http://w3id.org/sparql-generate/iter/>
PREFIX schema: <http://schema.org/>
BASE <https://saref.etsi.org/documentation/>
TEMPLATE <term/individual.rqg>( ?individual ) {
"""
\n<div class='description'><dl>{st:incr()}
"""
# types
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'belongsto') }</dt><dd>" ;
TEMPLATE <term/classDescription.rqg>( ?class , true ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
?individual rdf:type ?class
FILTER ( ?class != owl:NamedIndividual )
} .
# sameAs
TEMPLATE {
before = "\n<dt>{ fun:property(<en.properties>, 'issameas') }</dt><dd>" ;
TEMPLATE <term/individualAndLiteralDescription.rqg>( ?individual2 ) .
; separator = "<br/> "
; after = "</dd>"
}
DISTINCT WHERE {
{ ?individual owl:sameAs ?individual2 }
UNION
{ ?individual2 owl:sameAs ?individual }
} .
# assertions
TEMPLATE {
"\n<dt>{ st:call-template(<term/propertyDescription.rqg>, ?p ) }</dt><dd>"
TEMPLATE { TEMPLATE <term/individualAndLiteralDescription.rqg>(?value) . ; separator = ", "} WHERE { ?individual ?p ?value } .
"</dd>"
; separator = "<br/>"
}
DISTINCT WHERE {
?individual ?p ?value
{ ?p a owl:ObjectProperty } UNION { ?p a owl:DatatypeProperty }