forked from telicent-oss/smart-cache-graph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.ttl
136 lines (117 loc) · 4.08 KB
/
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
PREFIX : <#>
PREFIX fuseki: <http://jena.apache.org/fuseki#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ja: <http://jena.hpl.hp.com/2005/11/Assembler#>
PREFIX tdb2: <http://jena.apache.org/2016/tdb#>
PREFIX authz: <http://telicent.io/security#>
PREFIX cqrs: <http://telicent.io/cqrs#>
PREFIX graphql: <https://telicent.io/fuseki/modules/graphql#>
[] rdf:type fuseki:Server ;
fuseki:services (
:knowledgeService
:ontologyService
) .
:knowledgeService rdf:type fuseki:Service ;
fuseki:name "/knowledge" ;
fuseki:endpoint [ fuseki:operation fuseki:query ] ;
fuseki:endpoint [
fuseki:operation fuseki:query ;
fuseki:name "sparql"
];
fuseki:endpoint [
fuseki:operation fuseki:query ;
fuseki:name "query"
] ;
fuseki:endpoint [
fuseki:operation fuseki:gsp-r ;
fuseki:name "get"
] ;
## Only needed if also loading labelled data via HTTP.
fuseki:endpoint [
fuseki:operation authz:upload ;
fuseki:name "upload"
] ;
# Using the GraphQL operations
fuseki:endpoint [ fuseki:operation graphql:graphql ;
ja:context [ ja:cxtName "graphql:executor" ;
ja:cxtValue "io.telicent.jena.graphql.execution.telicent.graph.TelicentGraphExecutor"
] ;
fuseki:name "graphql" ];
## CQRS update
## Updates will be generate an RDF patch which is sent to the Kafka topic.
fuseki:endpoint [ fuseki:operation cqrs:update ;
# This name (ja:cxtValue) must agree with the connector below.
ja:context [ ja:cxtName "kafka:topic" ; ja:cxtValue "knowledge" ] ;
fuseki:name "update" ] ;
fuseki:dataset :dataset ;
.
#### Knowledge
## No security labels.
## # Transactional in-memory dataset.
## :dataset rdf:type ja:MemoryDataset .
## --- ABAC dataset
:dataset rdf:type authz:DatasetAuthz ;
authz:dataset :datasetBase;
## authz:tripleDefaultLabels "!";
##
## This substitutes the value of the environment variable
## or Java system property "USER_ATTRIBUTES_URL".
##
## USER_ATTRIBUTES_URL="http://host:port/users/lookup/{user}"
##
## {user} is replaced with the URL-safe encoding of the user id.
authz:attributesURL <env:USER_ATTRIBUTES_URL>;
.
# Storage of data.
:datasetBase rdf:type ja:MemoryDataset .
## ---- Fuseki-Kafka connector
PREFIX fk: <http://jena.apache.org/fuseki/kafka#>
<#connector> rdf:type fk:Connector ;
fk:bootstrapServers "kafka1:19092";
fk:topic "knowledge";
## This should refer to an authz:upload endpoint
fk:fusekiServiceName "/knowledge/upload";
##fk:syncTopic false;
fk:replayTopic true;
fk:stateFile "databases/Replay-RDF.state";
.
#### Ontology
## Plain database (no ABAC, no connection to Kafka)
:ontologyService rdf:type fuseki:Service ;
fuseki:name "/ontology" ;
fuseki:endpoint [ fuseki:operation fuseki:query ] ;
fuseki:endpoint [ fuseki:operation fuseki:update ] ;
fuseki:endpoint [ fuseki:operation fuseki:gsp-rw ] ;
fuseki:endpoint [
fuseki:operation fuseki:query ;
fuseki:name "sparql"
];
fuseki:endpoint [
fuseki:operation fuseki:query ;
fuseki:name "query"
] ;
fuseki:endpoint [
fuseki:operation fuseki:update ;
fuseki:name "update"
] ;
fuseki:endpoint [
fuseki:operation fuseki:gsp-r ;
fuseki:name "get"
] ;
fuseki:endpoint [
fuseki:operation fuseki:gsp-rw ;
fuseki:name "data"
] ;
fuseki:endpoint [
fuseki:operation fuseki:upload ;
fuseki:name "upload"
] ;
fuseki:dataset :ontologyDataset ;
.
# Transactional in-memory dataset.
:knowledgeDataset rdf:type ja:MemoryDataset ;
## Optional load with data on start-up
## ja:data "data1.trig";
## ja:data "data2.trig";
.