-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjoseki-config.ttl
172 lines (140 loc) · 5.56 KB
/
joseki-config.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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# This file is written in N3 / Turtle
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix module: <http://joseki.org/2003/06/module#> .
@prefix joseki: <http://joseki.org/2005/06/configuration#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
## --------------------------------------------------------------
## This file is written in N3 / Turtle
## It is an RDF graph - order of RDF triples does not matter
## to the machine but it does help people who need to edit this file.
## Note: web.xml must be in-step with this file.
## for each service,
## Note: adding rdfs:label to blank nodes will cause Joseki
## to print that in log messages.
## See also file:joseki-config-example.ttl
## --------------------------------------------------------------
## About this configuration
<> rdfs:label "Joseki Configuration File" .
## --------------------------------------------------------------
## About this server
<#server> rdf:type joseki:Server ;
# Example of some initialization code.
joseki:initialization
[ module:implementation
[ module:className <java:org.joseki.util.ServiceInitSimple> ;
rdfs:label "Example initializer" ; ]
] ;
.
## --------------------------------------------------------------
## Services
## Services are the points that request are sent to.
## serviceRef that will be used to match requests to services,
## not some resource URI for the description.
## Note that the service reference and the routing of incoming
## requests by URI as defined by web.xml have to align.
# Service 1
# General purpose SPARQL processor, no dataset, expects the
# request to specify the dataset (either by parameters in the
# protocol request or in the query itself).
<#service1>
rdf:type joseki:Service ;
rdfs:label "service point" ;
joseki:serviceRef "sparql" ; # web.xml must route this name to Joseki
joseki:processor joseki:ProcessorSPARQL ;
.
# Service 2 - SPARQL processor only handling a given dataset
<#service2>
rdf:type joseki:Service ;
rdfs:label "SPARQL on the books model" ;
joseki:serviceRef "books" ; # web.xml must route this name to Joseki
# dataset part
joseki:dataset <#books> ;
# Service part.
# This processor will not allow either the protocol,
# nor the query, to specify the dataset.
joseki:processor joseki:ProcessorSPARQL_FixedDS ;
.
## ---- SPARQL/Update
## A pair of services - one for SPARQL queries, one for SPARQL/Update
## Previous web.xml must also be updated to include a defintion for the
## servlet "SPARQL/Update service processor" and update requests must
## be routed to this servlet.
## <#serviceUpdate>
## rdf:type joseki:Service ;
## rdfs:label "SPARQL/Update" ;
## joseki:serviceRef "update/service" ;
## # dataset part
## joseki:dataset <#mem>;
## # Service part.
## # This processor will not allow either the protocol,
## # nor the query, to specify the dataset.
## joseki:processor joseki:ProcessorSPARQLUpdate
## .
##
## <#serviceRead>
## rdf:type joseki:Service ;
## rdfs:label "SPARQL" ;
## joseki:serviceRef "sparql/read" ;
## # dataset part
## joseki:dataset <#mem> ; ## Same dataset
## # Service part.
## # This processor will not allow either the protocol,
## # nor the query, to specify the dataset.
## joseki:processor joseki:ProcessorSPARQL_FixedDS ;
## .
## --------------------------------------------------------------
## Datasets
<#books> rdf:type ja:RDFDataset ;
rdfs:label "Books" ;
ja:defaultGraph
[ rdfs:label "books.ttl" ;
a ja:MemoryModel ;
ja:content [ja:externalContent <file:Data/books.ttl> ] ;
] ;
.
<#mem> rdf:type ja:RDFDataset ;
rdfs:label "MEM" ;
ja:defaultGraph [ a ja:MemoryModel ] ;
.
## --------------------------------------------------------------
## Processors
joseki:ProcessorSPARQL
rdfs:label "General SPARQL processor" ;
rdf:type joseki:Processor ;
module:implementation joseki:ImplSPARQL ;
# Parameters - this processor processes FROM/FROM NAMED
joseki:allowExplicitDataset "true"^^xsd:boolean ;
joseki:allowWebLoading "true"^^xsd:boolean ;
## And has no locking policy (it loads data each time).
## The default is mutex (one request at a time)
joseki:lockingPolicy joseki:lockingPolicyNone ;
.
joseki:ProcessorSPARQL_FixedDS
rdfs:label "SPARQL processor for fixed datasets" ;
rdf:type joseki:Processor ;
module:implementation joseki:ImplSPARQL ;
# This processor does not accept queries with FROM/FROM NAMED
joseki:allowExplicitDataset "false"^^xsd:boolean ;
joseki:allowWebLoading "false"^^xsd:boolean ;
joseki:lockingPolicy joseki:lockingPolicyMRSW ;
.
joseki:ProcessorSPARQLUpdate
rdfs:label "SPARQL Update processor" ;
rdf:type joseki:Processor ;
module:implementation joseki:ImplSPARQLUpdate ;
joseki:lockingPolicy joseki:lockingPolicyMRSW ;
.
joseki:ImplSPARQL
rdf:type joseki:ServiceImpl ;
module:className
<java:org.joseki.processors.SPARQL> .
joseki:ImplSPARQLUpdate
rdf:type joseki:ServiceImpl ;
module:className
<java:org.joseki.processors.SPARQLUpdate> .
# Local Variables:
# tab-width: 4
# indent-tabs-mode: nil
# End: