# DOKK database

This directory contains the files to run your local DOKK database. This
database is required to build the DOKK website.

## Setup database

First, let's build the local Fuseki SPARQL endpoint

`cd endpoint`

`make`

Now start the server

`./fuseki-server --config fuseki_config.ttl`

The server should now be available at `http://localhost:3030`. However... it's
empty! We have to add graphs.

DOKK graphs come in the form of [HDT files](http://www.rdfhdt.org). You can simply
download and place them in `endpoint/graph/<graph-name>.hdt`. That's it.

## Build your own HDT files

Usually, you don't need to make your HDT files. You can simply download them
and place the files in `endpoint/graph/<graph-name>.hdt`.

However, if you do want to build your own HDT files, you can do so like this

### Requirements

- GCC v6+
- libserd / libserd-dev v0.28
- libraptor / libraptor-dev v2+
- libz
- kyotocabinet
- aria2c
- java
- maven
- python3

### Build

`cd graphs`

`make`

To build a single graph use

`make GRAPH=<graph-name>`

where `<graph-name>` is the name of a sub-directory in `graph/`.
