Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ ENV SIGN_UP_CERT_VALIDITY=

ENV LOAD_DATASETS=

ENV CONTEXT_DATASET_URL=file:///var/linkeddatahub/datasets/system.trig
ENV CONTEXT_DATASET_URL=file:///var/linkeddatahub/datasets/dataspaces.trig

ENV SERVICES_DATASET_URL=file:///var/linkeddatahub/datasets/system.trig

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

Expand Down
62 changes: 62 additions & 0 deletions config/dataspaces.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
@prefix ac: <https://w3id.org/atomgraph/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 ldt: <https://www.w3.org/ns/ldt#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

### do not use blank nodes to identify resources! ###
### urn: URI scheme is used because applications are not accessible in their own dataspace (under $BASE_URI) ###

# root admin

<urn:linkeddatahub:apps/admin>
{
<urn:linkeddatahub:apps/admin> a lapp:Application ;
dct:title "LinkedDataHub admin" ;
lapp:origin <https://admin.localhost:4443> ;
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
ac:stylesheet <static/xsl/admin/layout.xsl> .

}

# root end-user

<urn:linkeddatahub:apps/end-user>
{
<urn:linkeddatahub:apps/end-user> a lapp:Application ;
dct:title "LinkedDataHub" ;
lapp:origin <https://localhost:4443> ;
ldt:ontology <https://localhost:4443/ns#> ;
ac:stylesheet <static/xsl/layout.xsl> ;
lapp:public true .

}

# northwind-traders admin

<urn:linkeddatahub:apps/northwind-traders/admin>
{
<urn:linkeddatahub:apps/northwind-traders/admin> a lapp:Application ;
dct:title "Northwind Traders admin" ;
lapp:origin <https://admin.northwind-traders.demo.localhost:4443> ;
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
ac:stylesheet <static/xsl/admin/layout.xsl> .

}

# northwind-traders end-user

<urn:linkeddatahub:apps/northwind-traders/end-user>
{
<urn:linkeddatahub:apps/northwind-traders/end-user> a lapp:Application ;
dct:title "Northwind Traders" ;
lapp:origin <https://northwind-traders.demo.localhost:4443> ;
ldt:ontology <https://northwind-traders.demo.localhost:4443/ns#> ;
ac:stylesheet <static/xsl/layout.xsl> ;
lapp:public true .

}
79 changes: 22 additions & 57 deletions config/system.trig
Original file line number Diff line number Diff line change
@@ -1,100 +1,65 @@
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
@prefix a: <https://w3id.org/atomgraph/core#> .
@prefix ac: <https://w3id.org/atomgraph/client#> .
@prefix a: <https://w3id.org/atomgraph/core#> .
@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 ldt: <https://www.w3.org/ns/ldt#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

### do not use blank nodes to identify resources! ###
### urn: URI scheme is used because applications/services are not accessible in their own dataspace (under $BASE_URI) ###
### internal deployment wiring - not for public sharing ###
### maps apps to their backend SPARQL services, and assigns admin/end-user roles ###

# root admin
# root admin - type + service binding

<urn:linkeddatahub:apps/admin>
{
<urn:linkeddatahub:apps/admin> a lapp:Application, lapp:AdminApplication ;
dct:title "LinkedDataHub admin" ;
# ldt:base <https://admin.localhost:4443/> ;
lapp:origin <https://admin.localhost:4443> ;
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
ldt:service <urn:linkeddatahub:services/admin> ;
ac:stylesheet <static/xsl/admin/layout.xsl> ;
lapp:frontendProxy <http://varnish-frontend:6060/> .

<urn:linkeddatahub:apps/admin> a lapp:AdminApplication ;
ldt:service <urn:linkeddatahub:services/admin> .
}

# root admin - service description

<urn:linkeddatahub:services/admin>
{

<urn:linkeddatahub:services/admin> a sd:Service ;
dct:title "LinkedDataHub admin service" ;
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
sd:endpoint <http://fuseki-admin:3030/ds/> ;
a:graphStore <http://fuseki-admin:3030/ds/> ;
a:quadStore <http://fuseki-admin:3030/ds/> ;
lapp:backendProxy <http://varnish-admin/> .

a:quadStore <http://fuseki-admin:3030/ds/> .
}

# root end-user
# root end-user - type + service binding

<urn:linkeddatahub:apps/end-user>
{
<urn:linkeddatahub:apps/end-user> a lapp:Application, lapp:EndUserApplication ;
dct:title "LinkedDataHub" ;
# ldt:base <https://localhost:4443/> ;
lapp:origin <https://localhost:4443> ;
ldt:ontology <https://localhost:4443/ns#> ;
ldt:service <urn:linkeddatahub:services/end-user> ;
ac:stylesheet <static/xsl/layout.xsl> ;
lapp:frontendProxy <http://varnish-frontend:6060/> ;
lapp:public true .

<urn:linkeddatahub:apps/end-user> a lapp:EndUserApplication ;
ldt:service <urn:linkeddatahub:services/end-user> .
}

# root end-user - service description

<urn:linkeddatahub:services/end-user>
{

<urn:linkeddatahub:services/end-user> a sd:Service ;
dct:title "LinkedDataHub service" ;
sd:supportedLanguage sd:SPARQL11Query, sd:SPARQL11Update ;
sd:endpoint <http://fuseki-end-user:3030/ds/> ;
a:graphStore <http://fuseki-end-user:3030/ds/> ;
a:quadStore <http://fuseki-end-user:3030/ds/> ;
lapp:backendProxy <http://varnish-end-user/> .

a:quadStore <http://fuseki-end-user:3030/ds/> .
}

# northwind-traders admin
# northwind-traders admin - type + service binding (reuses root admin service)

<urn:linkeddatahub:apps/northwind-traders/admin>
{
<urn:linkeddatahub:apps/northwind-traders/admin> a lapp:Application, lapp:AdminApplication ;
dct:title "Northwind Traders admin" ;
lapp:origin <https://admin.northwind-traders.demo.localhost:4443> ;
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
ldt:service <urn:linkeddatahub:services/admin> ;
ac:stylesheet <static/xsl/admin/layout.xsl> ;
lapp:frontendProxy <http://varnish-frontend:6060/> .

<urn:linkeddatahub:apps/northwind-traders/admin> a lapp:AdminApplication ;
ldt:service <urn:linkeddatahub:services/admin> .
}

# northwind-traders end-user
# northwind-traders end-user - type + service binding (reuses root end-user service)

<urn:linkeddatahub:apps/northwind-traders/end-user>
{
<urn:linkeddatahub:apps/northwind-traders/end-user> a lapp:Application, lapp:EndUserApplication ;
dct:title "Northwind Traders" ;
lapp:origin <https://northwind-traders.demo.localhost:4443> ;
ldt:ontology <https://northwind-traders.demo.localhost:4443/ns#> ;
ldt:service <urn:linkeddatahub:services/end-user> ;
ac:stylesheet <static/xsl/layout.xsl> ;
lapp:frontendProxy <http://varnish-frontend:6060/> ;
lapp:public true .

<urn:linkeddatahub:apps/northwind-traders/end-user> a lapp:EndUserApplication ;
ldt:service <urn:linkeddatahub:services/end-user> .
}
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ services:
#- CATALINA_OPTS="-Duser.timezone=Europe/Copenhagen"
- PROXY_HOST=nginx
- PROXY_PORT=9443
- FRONTEND_PROXY=http://varnish-frontend:6060/
- BACKEND_PROXY_ADMIN=http://varnish-admin/
- BACKEND_PROXY_END_USER=http://varnish-end-user/
- PROTOCOL=${PROTOCOL}
- HOST=${HOST}
- ABS_PATH=${ABS_PATH}
Expand Down Expand Up @@ -93,6 +96,7 @@ services:
- ./datasets/secretary:/var/linkeddatahub/datasets/secretary
- ./uploads:/var/www/linkeddatahub/uploads
- ./config/dev.log4j.properties:/usr/local/tomcat/webapps/ROOT/WEB-INF/classes/log4j.properties:ro
- ./config/dataspaces.trig:/var/linkeddatahub/datasets/dataspaces.trig
- ./config/system.trig:/var/linkeddatahub/datasets/system.trig
fuseki-admin:
image: atomgraph/fuseki:4.7.0
Expand Down
58 changes: 58 additions & 0 deletions http-tests/config/dataspaces.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@prefix lapp: <https://w3id.org/atomgraph/linkeddatahub/apps#> .
@prefix ldh: <https://w3id.org/atomgraph/linkeddatahub#> .
@prefix ac: <https://w3id.org/atomgraph/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 ldt: <https://www.w3.org/ns/ldt#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

### do not use blank nodes to identify resources! ###
### urn: URI scheme is used because applications are not accessible in their own dataspace (under $BASE_URI) ###

# root admin

<urn:linkeddatahub:apps/admin>
{
<urn:linkeddatahub:apps/admin> a lapp:Application ;
dct:title "LinkedDataHub admin" ;
lapp:origin <https://admin.localhost:4443> ;
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
ac:stylesheet <static/xsl/admin/layout.xsl> .
}

# root end-user

<urn:linkeddatahub:apps/end-user>
{
<urn:linkeddatahub:apps/end-user> a lapp:Application ;
dct:title "LinkedDataHub" ;
lapp:origin <https://localhost:4443> ;
ldt:ontology <https://localhost:4443/ns#> ;
ac:stylesheet <static/xsl/layout.xsl> ;
lapp:public true .
}

# test admin

<urn:linkeddatahub:apps/test/admin>
{
<urn:linkeddatahub:apps/test/admin> a lapp:Application ;
dct:title "Test admin" ;
lapp:origin <https://admin.test.localhost:4443> ;
ldt:ontology <https://w3id.org/atomgraph/linkeddatahub/admin#> ;
ac:stylesheet <static/xsl/admin/layout.xsl> .
}

# test end-user

<urn:linkeddatahub:apps/test/end-user>
{
<urn:linkeddatahub:apps/test/end-user> a lapp:Application ;
dct:title "Test" ;
lapp:origin <https://test.localhost:4443> ;
ldt:ontology <https://test.localhost:4443/ns#> ;
ac:stylesheet <static/xsl/layout.xsl> ;
lapp:public true .
}
Loading