-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtemplates.ttl
More file actions
124 lines (108 loc) · 4 KB
/
Copy pathtemplates.ttl
File metadata and controls
124 lines (108 loc) · 4 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
@base <http://atomgraph.com/blog/templates> .
@prefix : <#> .
@prefix ac: <http://atomgraph.com/ns/client#> .
@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 skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix ldt: <https://www.w3.org/ns/ldt#> .
@prefix ct: <https://www.w3.org/ns/ldt/core/templates#> .
@prefix tht: <https://www.w3.org/ns/ldt/topic-hierarchy/templates#> .
@prefix dh: <https://www.w3.org/ns/ldt/document-hierarchy/domain#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix sp: <http://spinrdf.org/sp#> .
@prefix spin: <http://spinrdf.org/spin#> .
@prefix spl: <http://spinrdf.org/spl#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix sioc: <http://rdfs.org/sioc/ns#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
: a ldt:Ontology ;
owl:imports tht: ;
rdfs:label "Blog templates" ;
dct:created "2014-10-21T01:53:00+01:00"^^xsd:dateTime .
:SPARQLEndpoint a rdfs:Class, ldt:Template ;
rdfs:subClassOf ct:SPARQLEndpoint ;
ldt:loadClass <java:com.atomgraph.core.model.impl.dataset.SPARQLEndpointBase> ;
rdfs:label "SPARQL endpoint" ;
rdfs:isDefinedBy : .
:GraphStore a rdfs:Class, ldt:Template ;
rdfs:subClassOf ct:GraphStore ;
ldt:loadClass <java:com.atomgraph.core.model.impl.dataset.GraphStoreBase> ;
rdfs:label "Graph Store" ;
rdfs:isDefinedBy : .
# posts
:PostContainer a rdfs:Class, ldt:Template ;
rdfs:subClassOf tht:Container ;
ldt:path "/posts/" ;
ldt:param :Limit, :ListMode, :Accept ;
ldt:cacheControl "public, max-age=3600" ;
rdfs:label "Post container template" ;
rdfs:isDefinedBy : .
:PostItem a rdfs:Class, ldt:Template ;
rdfs:subClassOf ct:Document ;
ldt:path "/posts/{slug}" ;
ldt:param :ReadMode, :Accept ;
ldt:cacheControl "public, max-age=3600" ;
rdfs:label "Post item template" ;
rdfs:isDefinedBy : .
# categories
:CategoryContainer a rdfs:Class, ldt:Template ;
rdfs:subClassOf tht:Container ;
ldt:path "/categories/" ;
ldt:param :Limit, :ListMode, :Accept ;
ldt:cacheControl "public, max-age=3600" ;
rdfs:label "Category container template" ;
rdfs:isDefinedBy : .
:CategoryItem a rdfs:Class, ldt:Template ;
rdfs:subClassOf tht:Item ;
ldt:path "/categories/{slug}" ;
ldt:query
[ a sp:Describe ;
sp:text """
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dct: <http://purl.org/dc/terms/>
DESCRIBE ?this ?category ?post {
?category foaf:isPrimaryTopicOf ?this
OPTIONAL {
SELECT DISTINCT ?post ?category
{
?post dct:subject ?category
}
}
}"""
] ;
ldt:param :ReadMode, :Accept ;
ldt:cacheControl "public, max-age=3600" ;
rdfs:label "Category item template" ;
rdfs:isDefinedBy : .
# parameters
:ListMode a ldt:Parameter ;
rdfs:label "List mode" ;
spl:predicate ac:mode ;
spl:valueType ac:ContainerMode ;
spl:optional true ;
spl:defaultValue ac:ListMode ;
rdfs:isDefinedBy : .
:ReadMode a ldt:Parameter ;
rdfs:label "Read mode" ;
spl:predicate ac:mode ;
spl:valueType ac:DocumentMode ;
spl:optional true ;
spl:defaultValue ac:ReadMode ;
rdfs:isDefinedBy : .
:Limit a ldt:Parameter ;
rdfs:label "Limit" ;
spl:predicate dh:limit ;
spl:valueType xsd:long ;
spl:defaultValue 20 ;
spl:optional true ;
rdfs:isDefinedBy : .
:Accept a ldt:Parameter ;
rdfs:label "Media type" ;
spl:predicate ac:accept ;
spl:valueType xsd:string ;
spl:optional true ;
rdfs:isDefinedBy : .