This project allows web users to write RDF as Turtle, check its syntax, visualize the data as a graph, and use SPARQL, RDFS, OWL, SHACL and ShEx.
The project is intended to provide many functionalities in one system, and is intended to be used for small examples (e.g., for teaching or demos).
You can see a demo here. Note that the demo is not intended to be a production system. If you intend to use RDF Playground regularly (e.g., for a class), we would recommend to install and run it locally in a server you control. There are two options: direct or Docker.
Ensure you've cloned or downloaded this repository on the machine you want to run RDF Playground. You will need to install and run the back-end (Mimir) and the front-end (Odin) for RDF Playground to run.
The backend is written in Kotlin using the Spring Boot framework; dependencies and configurations are done using Maven. The code also has a fork of the (Python) OWL-RL reasoner inside, so you have to create and environment for this code before executing the backend.
⚠ For this to work you should use Python 3.5+ and Pip
Go to src/main/reasoner/owlrl
and create a virtualenv (we use venv) according to
venv documentation and install BastyZ/OWL-RL:
# Create venv environment
python3 -m venv venv
# Activate
source venv/bin/activate
# Install BastyZ/OWL-RL on the current environment
python setup.py install
Then, having maven installed, you go to mimir/
directory where pom.xml
is and
write in your terminal:
# install dependencies
mvn install
And you can run it with:
# Activate venv before running SpringBoot
source src/main/reasoner/owlrl/venv/bin/activate
mvn spring-boot:run
The frontend is written in Javascript + HTML using Vuetify framework and nodejs
13; having that and npm installed you can go to the odin/
directory and write:
# install dependencies
npm install
And you can run it with:
# run for development
npm run-script serve
# create a production build
npm run-script build
This last command produces a production-ready bundle in the dist/
directory,
see https://cli.vuejs.org/guide/cli-service.html#vue-cli-service-build for more
information.
For more information on the serve command see https://cli.vuejs.org/guide/cli-service.html#vue-cli-service-serve.
For configurations on the backend and frontend see their respective README files.
Ensure you've cloned or downloaded this repository on the machine you want to run RDF Playground.
The repository also provides a Dockerfile
that facilitates installing and running RDF Playground in Docker (credit to @fvillena).
Ensure that Docker is installed and running (see instructions).
The following commands assume a Unix-like environment. Some commands may need sudo
depending on how you've installed and run Docker.
With Docker running, go to the RDFPlayground main folder (the one containing Dockerfile
):
cd /path/to/RDFPlayground
Next we build a Docker image:
docker build -t rdf-playground .
This might take some time. The final Docker image should be around 1GB. Once installed you can run
sudo docker image list
Where you should see the rdf-playground
image listed.
Next we need to run a Docker container for RDF Playground. Here we assume that we want to map between port 80
of the container for the front-end to port 80
of the localhost
of the machine running Docker (the first 80
is the port of the machine; the second 80
is the port of the container) and port 9060
of the container for the back-end to port 9060
of the localhost
of the machine. We also assume that we want to restart RDF Playground if for any reason it is not running with the always
option (see more options).
docker run -d -p 127.0.0.1:80:80 -p 127.0.0.1:9060:9060 --restart always rdf-playground
You should now see the container running with:
docker ps
If this worked, you should be able to call (in the case of port 80
on the machine, otherwise adding :1234
without space if using port 1234
on the machine):
wget localhost
This should download a HTML file, which you can preview with:
more index.html
It may indicate that Javascript is not running, but this should not be a problem once you load the page from the browser.
Now RDF Playground should be running on the selected port of your machine. (You may still need to configure external Web access via a static I.P. or hostname to the selected port on your machine.)
Copyright © 2020 Bastián Inostroza, Licensed under the Apache License, Version 2.0.