-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy paththt.ttl
68 lines (60 loc) · 2.03 KB
/
tht.ttl
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
58
59
60
61
62
63
64
65
66
67
68
@base <https://www.w3.org/ns/ldt/topic-hierarchy/templates> .
@prefix : <#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix ldt: <https://www.w3.org/ns/ldt#> .
@prefix ct: <https://www.w3.org/ns/ldt/core/templates#> .
@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
: a ldt:Ontology, owl:Ontology ;
owl:imports ct:, sp: ;
owl:versionInfo "1.1.4" ;
rdfs:label "Topic hierarchy templates" ;
rdfs:comment "Document hierarchy with topic resources" ;
dct:created "2016-08-31T21:54:00+02:00"^^xsd:dateTime ;
vann:preferredNamespaceUri "https://www.w3.org/ns/ldt/topic-hierarchy/templates#" ;
vann:preferredNamespacePrefix "tht";
dct:license <http://www.opendatacommons.org/licenses/pddl/1.0/> .
# TEMPLATES
:Document a ldt:Template ;
ldt:extends ct:Document ;
ldt:query :DescribeWithTopic ;
ldt:update :DeleteWithTopic ;
rdfs:label "Document" ;
rdfs:isDefinedBy : .
# COMMANDS
:DescribeWithTopic a sp:Describe, sp:Query ;
sp:text """PREFIX foaf: <http://xmlns.com/foaf/0.1/>
DESCRIBE ?this ?primaryTopic
WHERE
{ ?this ?p ?o
OPTIONAL
{ ?this foaf:primaryTopic ?primaryTopic }
}""" ;
rdfs:label "Describe with topic" ;
rdfs:isDefinedBy : .
:DeleteWithTopic a sp:DeleteWhere, sp:Update ;
sp:text """PREFIX foaf: <http://xmlns.com/foaf/0.1/>
DELETE {
?this ?p ?o .
?primaryTopic ?p ?o .
}
WHERE {
{
?this ?p ?o .
}
UNION
{
?primaryTopic foaf:isPrimaryTopicOf ?this .
?primaryTopic ?p ?o .
}
}""" ;
rdfs:label "Delete with topic" ;
rdfs:isDefinedBy : .