-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
introduced server quickstart documentation
- Loading branch information
Marvin Hofer
committed
Jan 12, 2024
1 parent
0774d8e
commit d889ef8
Showing
2 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
143 changes: 143 additions & 0 deletions
143
databus-mods-server/databus-mods-server-core/template-application.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
# spring server configuration | ||
server: | ||
port: 9050 | ||
|
||
# spring | ||
spring: | ||
datasource: | ||
driver-class-name: 'org.apache.derby.jdbc.EmbeddedDriver' | ||
username: '' | ||
password: '' | ||
url: 'jdbc:derby:derby;create=true' | ||
jpa: | ||
hibernate: | ||
ddl-auto: 'create-drop' | ||
# ddl-auto: 'update' | ||
|
||
# configuration for the mod server | ||
mod-server: | ||
# storage for the raw metadata documents | ||
volume: ./target/repo | ||
web-base: "https://mods.tools.dbpedia.org/main/" | ||
triple-store: | ||
db-url: 'jdbc:virtuoso://localhost:11111/charset=UTF-8/' | ||
db-user: 'dba' | ||
db-password: '' | ||
endpoint: 'http://localhost:8890/sparql' | ||
schedule: | ||
online-period: 604800000 | ||
# online-check: 5000 | ||
online-check: 86400000 | ||
# task-updates: -1 | ||
task-updates: 3600000 | ||
|
||
mods: | ||
- name: 'filemetric' | ||
accept: 'file' | ||
select: 'file-metrics.ttl' | ||
workers: | ||
- 'http://localhost:14100-14114/modApi' | ||
query: ' | ||
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX dct: <http://purl.org/dc/terms/> | ||
SELECT DISTINCT * WHERE { | ||
{ | ||
SELECT ?issued ?file ?downloadURL ?sha256sum { | ||
?d dataid:file ?file . | ||
?d dataid:sha256sum ?sha256sum . | ||
?d dct:issued ?issued . | ||
?d dcat:downloadURL ?downloadURL . | ||
{ | ||
SELECT ?file { | ||
?s a dataid:Dataset. | ||
?s dcat:distribution/dataid:file ?file | ||
} | ||
} | ||
} ORDER BY DESC(?issued) | ||
} | ||
} | ||
' | ||
- name: 'mimetype' | ||
accept: 'file' | ||
select: | ||
workers: | ||
- 'http://localhost:14000-14004/modApi' | ||
query: ' | ||
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX dct: <http://purl.org/dc/terms/> | ||
SELECT DISTINCT * WHERE { | ||
{ | ||
SELECT ?issued ?file ?downloadURL ?sha256sum { | ||
?d dataid:file ?file . | ||
?d dataid:sha256sum ?sha256sum . | ||
?d dct:issued ?issued . | ||
?d dcat:downloadURL ?downloadURL . | ||
{ | ||
SELECT ?file { | ||
?s a dataid:Dataset. | ||
?s dcat:distribution/dataid:file ?file | ||
} | ||
} | ||
} ORDER BY DESC(?issued) | ||
} | ||
} | ||
' | ||
- name: 'void' | ||
accepts: | ||
- 'file' | ||
selects: | ||
- 'rdfVoid.ttl' | ||
workers: | ||
- 'http://localhost:14200-14214/modApi' | ||
query: ' | ||
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX dct: <http://purl.org/dc/terms/> | ||
SELECT DISTINCT * WHERE { | ||
{ | ||
SELECT ?issued ?file ?downloadURL ?sha256sum { | ||
?d dataid:file ?file . | ||
?d dataid:sha256sum ?sha256sum . | ||
?d dct:issued ?issued . | ||
?d dcat:downloadURL ?downloadURL . | ||
{ | ||
SELECT ?file { | ||
?s a dataid:Dataset. | ||
?s dataid:account <https://databus.dbpedia.org/jj-author> . | ||
?s dcat:distribution/dataid:file ?file | ||
} | ||
} | ||
} ORDER BY DESC(?issued) | ||
} | ||
} | ||
' | ||
- name: 'spo' | ||
accept: 'file' | ||
select: | ||
workers: | ||
- 'http://localhost:14300-14309/modApi' | ||
query: ' | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#> | ||
PREFIX dct: <http://purl.org/dc/terms/> | ||
PREFIX dcat: <http://www.w3.org/ns/dcat#> | ||
PREFIX db: <https://databus.dbpedia.org/> | ||
PREFIX dataid-cv: <http://dataid.dbpedia.org/ns/cv#> | ||
SELECT ?file ?issued ?sha256sum ?downloadURL WHERE { | ||
?s dct:publisher <https://yum-yab.github.io/webid.ttl#onto>. | ||
?s dataid:file ?file . | ||
?s dct:issued ?issued . | ||
?s dataid:sha256sum ?sha256sum . | ||
?s dcat:downloadURL ?downloadURL . | ||
?s dataid-cv:type ?cv . | ||
FILTER( str(?cv) = "parsed") | ||
?s dataid:formatExtension ?ext . | ||
FILTER( str(?ext) = "nt" ) | ||
} | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Quickstart Server | ||
|
||
Quickstart guide to configure and run Databus Mods Server. | ||
|
||
## Prerequisites | ||
- Java: > 17 | ||
- Maven: > 3.8.4 | ||
- Storage | ||
- RDF Store and Sparql Server | ||
- Http Web Server | ||
|
||
## Setup | ||
|
||
The Databus Mods Server can run natively with local installed Maven and Java or inside docker. | ||
|
||
## Install | ||
|
||
```bash | ||
git clone $THIS_REPO | ||
cd databus-mods | ||
mvn clean compile | ||
``` | ||
|
||
## Configure | ||
|
||
As the server is implemented with Spring Boot, all configuration paramters are defined in a spring application configuration file `application.properties` or `application.yml`. | ||
|
||
```yaml | ||
# Minimal example application yml | ||
|
||
``` | ||
|
||
## Run with Maven and Java | ||
|
||
## Run with Docker-Compose | ||
|
||
### Build Image | ||
|
||
```bash | ||
docker built -t dbpedia/databus-mods-server . | ||
``` | ||
|
||
### Start Containers | ||
|
||
```yaml | ||
version: '3' | ||
|
||
services: | ||
server: | ||
image: | ||
|
||
# todo https://github.com/docker/compose/issues/1896 | ||
``` | ||
|