-
Notifications
You must be signed in to change notification settings - Fork 1
/
joseki-config-sdb.ttl
134 lines (112 loc) · 4.52 KB
/
joseki-config-sdb.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
@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#> .
@prefix sdb: <http://jena.hpl.hp.com/2007/sdb#> .
<> rdfs:label "Joseki Configuration File - SDB example" .
# Stripped down to support one service that exposes an
# SDB store as a SPARQL endpoint for query and one for
# one of the graphs in an SDB store.
[] rdf:type joseki:Server .
## --------------------------------------------------------------
## Services
# Service publishes the whole of the SDB store - this is the usual way to use SDB.
<#service1>
rdf:type joseki:Service ;
rdfs:label "SPARQL-SDB" ;
joseki:serviceRef "sparql" ; # web.xml must route this name to Joseki
joseki:dataset <#sdb> ;
joseki:processor joseki:ProcessorSPARQL_FixedDS ;
.
# Service that publishes part of an SDB store.
## <#service2>
## rdf:type joseki:Service ;
## rdfs:label "SPARQL-SDB (alt)" ;
## joseki:serviceRef "sparql/graph" ; # web.xml must route this name to Joseki
## joseki:dataset <#sdb-part> ;
## joseki:processor joseki:ProcessorSPARQL_FixedDS ;
## .
## SPARQL/Update.
## Creation of named graph from web requests is not supported.
<#serviceUpdate>
rdf:type joseki:Service ;
rdfs:label "SPARQL/Update" ;
joseki:serviceRef "update/service" ;
# dataset part
joseki:dataset <#sdb>; # Same as service1
joseki:processor joseki:ProcessorSPARQLUpdate
.
## --------------------------------------------------------------
## Datasets
## See also SDB documentation -- http://jena.hpl.hp.com/wiki/SDB
## Special declarations to cause SDB to be used.
## Initialize SDB.
## Tell the system that sdb:DatasetStore is an implementation of ja:RDFDataset .
## Tell the system that sdb:Model is an implementation of ja:RDFDataset .
[] ja:loadClass "com.hp.hpl.jena.sdb.SDB" .
sdb:DatasetStore rdfs:subClassOf ja:RDFDataset .
sdb:Model rdfs:subClassOf ja:Model .
<#sdb> rdf:type sdb:DatasetStore ;
## Number of concurrent connections allowed to this dataset.
joseki:poolSize 2 ;
sdb:store <#store> .
<#store> rdf:type sdb:Store ;
rdfs:label "SDB" ;
sdb:layout "layout2" ;
sdb:connection
[ rdf:type sdb:SDBConnection ;
## sdb:sdbType "postgresql" ;
## sdb:sdbHost "localhost" ;
## sdb:sdbName "SDB" ;
# Using Apache Derby
sdb:sdbHost "localhost" ;
sdb:sdbType "derby" ;
sdb:sdbName "DB/Derby" ;
]
.
# Pick one graph out of the SDB store.
# Do not assemble the whole of the store this way - it is less efficient for that.
<#sdb-part> rdf:type ja:RDFDataset ;
# If ja:namedGraph is used here, there is no correspondence
# with the name in the SDB store.
ja:defaultGraph <#sdb-one-graph> ;
.
<#sdb-one-graph> a sdb:Model ;
sdb:dataset <#sdb> ;
# Uncomment to pick out a named graph from the store.
# If no "sdb:namedGraph" appearsm the store's default graph is used.
# is used as default graph of the dataset publically visible.
#sdb:graphName <http://example/aNamedGraph> ;
# Or even the merge of all named graphs
#sdb:graphName <urn:x-arq:UnionGraph> ;
.
## --------------------------------------------------------------
## Processors
joseki:ProcessorSPARQL_FixedDS
rdfs:label "SPARQL processor for fixed datasets" ;
rdf:type joseki:Processor ;
module:implementation
[ rdf:type joseki:ServiceImpl ;
module:className <java:org.joseki.processors.SPARQL>
] ;
# This processor does not accept queries with FROM/FROM NAMED
joseki:allowExplicitDataset "false"^^xsd:boolean ;
joseki:allowWebLoading "false"^^xsd:boolean ;
# The database is safe for MRSW (multiple-reader, single-writer).
joseki:lockingPolicy joseki:lockingPolicyMRSW ;
.
joseki:ProcessorSPARQLUpdate
rdfs:label "SPARQL Update processor" ;
rdf:type joseki:Processor ;
module:implementation
[ rdf:type joseki:ServiceImpl ;
module:className <java:org.joseki.processors.SPARQLUpdate>
] ;
joseki:lockingPolicy joseki:lockingPolicyMRSW ;
.
# Local Variables:
# tab-width: 4
# indent-tabs-mode: nil
# End: