Skip to content

Commit 578327d

Browse files
committed
Split dataspace metadata from service metadata
1 parent f85583a commit 578327d

10 files changed

Lines changed: 237 additions & 151 deletions

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ ENV SIGN_UP_CERT_VALIDITY=
8989

9090
ENV LOAD_DATASETS=
9191

92-
ENV CONTEXT_DATASET_URL=file:///var/linkeddatahub/datasets/system.trig
92+
ENV CONTEXT_DATASET_URL=file:///var/linkeddatahub/datasets/dataspaces.trig
93+
94+
ENV SERVICES_DATASET_URL=file:///var/linkeddatahub/datasets/services.trig
9395

9496
ENV ADMIN_DATASET_URL=file:///var/linkeddatahub/datasets/admin.trig
9597

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,41 @@
11
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
22
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
3-
@prefix a: <https://w3id.org/atomgraph/core#> .
4-
@prefix ac: <https://w3id.org/atomgraph/client#> .
3+
@prefix ac: <https://w3id.org/atomgraph/client#> .
54
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
65
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
76
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
87
@prefix ldt: <https://www.w3.org/ns/ldt#> .
9-
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
108
@prefix dct: <http://purl.org/dc/terms/> .
119
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
1210

1311
### do not use blank nodes to identify resources! ###
14-
### urn: URI scheme is used because applications/services are not accessible in their own dataspace (under $BASE_URI) ###
12+
### urn: URI scheme is used because applications are not accessible in their own dataspace (under $BASE_URI) ###
1513

1614
# root admin
1715

1816
<urn:linkeddatahub:apps/admin>
1917
{
2018
<urn:linkeddatahub:apps/admin> a lapp:Application, lapp:AdminApplication ;
2119
dct:title "LinkedDataHub admin" ;
22-
# ldt:base <https://admin.localhost:4443/> ;
2320
lapp:origin <https://admin.localhost:4443> ;
2421
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
25-
ldt:service <urn:linkeddatahub:services/admin> ;
2622
ac:stylesheet <static/xsl/admin/layout.xsl> .
2723

2824
}
2925

30-
<urn:linkeddatahub:services/admin>
31-
{
32-
33-
<urn:linkeddatahub:services/admin> a sd:Service ;
34-
dct:title "LinkedDataHub admin service" ;
35-
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
36-
sd:endpoint <http://fuseki-admin:3030/ds/> ;
37-
a:graphStore <http://fuseki-admin:3030/ds/> ;
38-
a:quadStore <http://fuseki-admin:3030/ds/> .
39-
40-
}
41-
4226
# root end-user
4327

4428
<urn:linkeddatahub:apps/end-user>
4529
{
4630
<urn:linkeddatahub:apps/end-user> a lapp:Application, lapp:EndUserApplication ;
4731
dct:title "LinkedDataHub" ;
48-
# ldt:base <https://localhost:4443/> ;
4932
lapp:origin <https://localhost:4443> ;
5033
ldt:ontology <https://localhost:4443/ns#> ;
51-
ldt:service <urn:linkeddatahub:services/end-user> ;
5234
ac:stylesheet <static/xsl/layout.xsl> ;
5335
lapp:public true .
5436

5537
}
5638

57-
<urn:linkeddatahub:services/end-user>
58-
{
59-
60-
<urn:linkeddatahub:services/end-user> a sd:Service ;
61-
dct:title "LinkedDataHub service" ;
62-
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
63-
sd:endpoint <http://fuseki-end-user:3030/ds/> ;
64-
a:graphStore <http://fuseki-end-user:3030/ds/> ;
65-
a:quadStore <http://fuseki-end-user:3030/ds/> .
66-
67-
}
68-
6939
# northwind-traders admin
7040

7141
<urn:linkeddatahub:apps/northwind-traders/admin>
@@ -74,7 +44,6 @@
7444
dct:title "Northwind Traders admin" ;
7545
lapp:origin <https://admin.northwind-traders.demo.localhost:4443> ;
7646
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
77-
ldt:service <urn:linkeddatahub:services/admin> ;
7847
ac:stylesheet <static/xsl/admin/layout.xsl> .
7948

8049
}
@@ -87,7 +56,6 @@
8756
dct:title "Northwind Traders" ;
8857
lapp:origin <https://northwind-traders.demo.localhost:4443> ;
8958
ldt:ontology <https://northwind-traders.demo.localhost:4443/ns#> ;
90-
ldt:service <urn:linkeddatahub:services/end-user> ;
9159
ac:stylesheet <static/xsl/layout.xsl> ;
9260
lapp:public true .
9361

config/services.trig

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
@prefix a: <https://w3id.org/atomgraph/core#> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix ldt: <https://www.w3.org/ns/ldt#> .
4+
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
5+
@prefix dct: <http://purl.org/dc/terms/> .
6+
7+
### internal deployment wiring - not for public sharing ###
8+
### maps apps to their backend SPARQL services ###
9+
10+
# root admin - service binding
11+
12+
<urn:linkeddatahub:apps/admin>
13+
{
14+
<urn:linkeddatahub:apps/admin> ldt:service <urn:linkeddatahub:services/admin> .
15+
}
16+
17+
# root admin - service description
18+
19+
<urn:linkeddatahub:services/admin>
20+
{
21+
<urn:linkeddatahub:services/admin> a sd:Service ;
22+
dct:title "LinkedDataHub admin service" ;
23+
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
24+
sd:endpoint <http://fuseki-admin:3030/ds/> ;
25+
a:graphStore <http://fuseki-admin:3030/ds/> ;
26+
a:quadStore <http://fuseki-admin:3030/ds/> .
27+
}
28+
29+
# root end-user - service binding
30+
31+
<urn:linkeddatahub:apps/end-user>
32+
{
33+
<urn:linkeddatahub:apps/end-user> ldt:service <urn:linkeddatahub:services/end-user> .
34+
}
35+
36+
# root end-user - service description
37+
38+
<urn:linkeddatahub:services/end-user>
39+
{
40+
<urn:linkeddatahub:services/end-user> a sd:Service ;
41+
dct:title "LinkedDataHub service" ;
42+
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
43+
sd:endpoint <http://fuseki-end-user:3030/ds/> ;
44+
a:graphStore <http://fuseki-end-user:3030/ds/> ;
45+
a:quadStore <http://fuseki-end-user:3030/ds/> .
46+
}
47+
48+
# northwind-traders admin - service binding (reuses root admin service)
49+
50+
<urn:linkeddatahub:apps/northwind-traders/admin>
51+
{
52+
<urn:linkeddatahub:apps/northwind-traders/admin> ldt:service <urn:linkeddatahub:services/admin> .
53+
}
54+
55+
# northwind-traders end-user - service binding (reuses root end-user service)
56+
57+
<urn:linkeddatahub:apps/northwind-traders/end-user>
58+
{
59+
<urn:linkeddatahub:apps/northwind-traders/end-user> ldt:service <urn:linkeddatahub:services/end-user> .
60+
}

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ services:
9696
- ./datasets/secretary:/var/linkeddatahub/datasets/secretary
9797
- ./uploads:/var/www/linkeddatahub/uploads
9898
- ./config/dev.log4j.properties:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.properties:ro
99-
- ./config/system.trig:/var/linkeddatahub/datasets/system.trig
99+
- ./config/dataspaces.trig:/var/linkeddatahub/datasets/dataspaces.trig
100+
- ./config/services.trig:/var/linkeddatahub/datasets/services.trig
100101
fuseki-admin:
101102
image: atomgraph/fuseki:4.7.0
102103
user: root # otherwise fuseki user does not have permissions to the mounted folder which is owner by root

http-tests/config/dataspaces.trig

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
2+
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
3+
@prefix ac: <https://w3id.org/atomgraph/client#> .
4+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
5+
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
6+
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
7+
@prefix ldt: <https://www.w3.org/ns/ldt#> .
8+
@prefix dct: <http://purl.org/dc/terms/> .
9+
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
10+
11+
### do not use blank nodes to identify resources! ###
12+
### urn: URI scheme is used because applications are not accessible in their own dataspace (under $BASE_URI) ###
13+
14+
# root admin
15+
16+
<urn:linkeddatahub:apps/admin>
17+
{
18+
<urn:linkeddatahub:apps/admin> a lapp:Application, lapp:AdminApplication ;
19+
dct:title "LinkedDataHub admin" ;
20+
lapp:origin <https://admin.localhost:4443> ;
21+
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
22+
ac:stylesheet <static/xsl/admin/layout.xsl> .
23+
}
24+
25+
# root end-user
26+
27+
<urn:linkeddatahub:apps/end-user>
28+
{
29+
<urn:linkeddatahub:apps/end-user> a lapp:Application, lapp:EndUserApplication ;
30+
dct:title "LinkedDataHub" ;
31+
lapp:origin <https://localhost:4443> ;
32+
ldt:ontology <https://localhost:4443/ns#> ;
33+
ac:stylesheet <static/xsl/layout.xsl> ;
34+
lapp:public true .
35+
}
36+
37+
# test admin
38+
39+
<urn:linkeddatahub:apps/test/admin>
40+
{
41+
<urn:linkeddatahub:apps/test/admin> a lapp:Application, lapp:AdminApplication ;
42+
dct:title "Test admin" ;
43+
lapp:origin <https://admin.test.localhost:4443> ;
44+
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
45+
ac:stylesheet <static/xsl/admin/layout.xsl> .
46+
}
47+
48+
# test end-user
49+
50+
<urn:linkeddatahub:apps/test/end-user>
51+
{
52+
<urn:linkeddatahub:apps/test/end-user> a lapp:Application, lapp:EndUserApplication ;
53+
dct:title "Test" ;
54+
lapp:origin <https://test.localhost:4443> ;
55+
ldt:ontology <https://test.localhost:4443/ns#> ;
56+
ac:stylesheet <static/xsl/layout.xsl> ;
57+
lapp:public true .
58+
}

http-tests/config/services.trig

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@prefix a: <https://w3id.org/atomgraph/core#> .
2+
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3+
@prefix ldt: <https://www.w3.org/ns/ldt#> .
4+
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
5+
@prefix dct: <http://purl.org/dc/terms/> .
6+
7+
### internal deployment wiring - not for public sharing ###
8+
### maps apps to their backend SPARQL services ###
9+
10+
# root admin - service binding
11+
12+
<urn:linkeddatahub:apps/admin>
13+
{
14+
<urn:linkeddatahub:apps/admin> ldt:service <urn:linkeddatahub:services/admin> .
15+
}
16+
17+
# root admin - service description
18+
19+
<urn:linkeddatahub:services/admin>
20+
{
21+
<urn:linkeddatahub:services/admin> a sd:Service ;
22+
dct:title "LinkedDataHub admin service" ;
23+
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
24+
sd:endpoint <http://fuseki-admin:3030/ds/> ;
25+
a:graphStore <http://fuseki-admin:3030/ds/> ;
26+
a:quadStore <http://fuseki-admin:3030/ds/> .
27+
}
28+
29+
# root end-user - service binding
30+
31+
<urn:linkeddatahub:apps/end-user>
32+
{
33+
<urn:linkeddatahub:apps/end-user> ldt:service <urn:linkeddatahub:services/end-user> .
34+
}
35+
36+
# root end-user - service description
37+
38+
<urn:linkeddatahub:services/end-user>
39+
{
40+
<urn:linkeddatahub:services/end-user> a sd:Service ;
41+
dct:title "LinkedDataHub service" ;
42+
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
43+
sd:endpoint <http://fuseki-end-user:3030/ds/> ;
44+
a:graphStore <http://fuseki-end-user:3030/ds/> ;
45+
a:quadStore <http://fuseki-end-user:3030/ds/> .
46+
}
47+
48+
# test admin - service binding
49+
50+
<urn:linkeddatahub:apps/test/admin>
51+
{
52+
<urn:linkeddatahub:apps/test/admin> ldt:service <urn:linkeddatahub:services/test/admin> .
53+
}
54+
55+
# test admin - service description
56+
57+
<urn:linkeddatahub:services/test/admin>
58+
{
59+
<urn:linkeddatahub:services/test/admin> a sd:Service ;
60+
dct:title "Test admin service" ;
61+
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
62+
sd:endpoint <http://fuseki-admin:3030/ds/> ;
63+
a:graphStore <http://fuseki-admin:3030/ds/> ;
64+
a:quadStore <http://fuseki-admin:3030/ds/> .
65+
}
66+
67+
# test end-user - service binding
68+
69+
<urn:linkeddatahub:apps/test/end-user>
70+
{
71+
<urn:linkeddatahub:apps/test/end-user> ldt:service <urn:linkeddatahub:services/test/end-user> .
72+
}
73+
74+
# test end-user - service description
75+
76+
<urn:linkeddatahub:services/test/end-user>
77+
{
78+
<urn:linkeddatahub:services/test/end-user> a sd:Service ;
79+
dct:title "Test service" ;
80+
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
81+
sd:endpoint <http://fuseki-end-user:3030/ds/> ;
82+
a:graphStore <http://fuseki-end-user:3030/ds/> ;
83+
a:quadStore <http://fuseki-end-user:3030/ds/> .
84+
}

0 commit comments

Comments
 (0)