MHDBDB XML Ontology

This directory contains all sources of the MHDBDB XML Ontology.

Template Usage

The build process allows the usage of templates in .ttl files. Tags are marked with {{ }}.

Tag Function
{{ modificationDate }} Inserts the date of the last commit for the file in format YYYY-mm-dd+HH-MM (xsd:date).
{{ sparql }} Inserts the content of a .sparql file of the same name (without extension) as the .ttl file and lying in the same directory.
{{ sparqlBlocks.$blockName }} Inserts the content of a $blockName.sparql file located in the sparqlBlocks directory.
{{ endpoint.$endPointName }} Inserts the uri of a sparql endpoint specified in config.json of repository.

Build

Preparations

Use 'config.json' from core ontology repository.

Setup Python3 venv

On your machine, Python 3.6 or higher needs to be installed. Installation instruction can be found here.

After installing, generate virtual environment via console in project folder. All commands have to be executed from the projects main directory.

$ python3 -m venv venv 

Your environment should have been generated locally in dhplus-models/venv/. That folder won't be added to the .git repository.

To add all needed libraries, you need to activate you environment first:

Linux

$ . venv/bin/activate

Windows

$ .\/venv/Scripts/Activate.ps1

After activation you should see (venv) in front of your active terminal line.

Install required external libraries

You need to load all needed libraries with

(venv)$ pip3 install -r requirements.txt
Install dhpt library

Clone repository dhplus_python_tools. Navigate to repo in console and install with pip

(venv)$ pip3 install -e .

Needed tools

TopBraid SHACL API

See Documentation for detailed installing instructions. Needs to be added to PATH.

Add to Path (Linux)
$ export SHACLROOT=[your shacle directory]/bin/
$ export PATH=$SHACLROOT:$PATH
Widoco

Download .jar from Repository and modify path in config.json.