Skip to content
Snippets Groups Projects
user avatar
Kristina Magnussen authored
2c05b09a
History

KG-Shapes (Framework-API)

This short introduction provides basic information on how to setup the project in either production or development environment.

Folder Structure

Our project combines the aforementioned tools and provides a framework, to

  1. Fetch some data from a SparqL-Endpoint
  2. Infer constraints on the fetched data (done with RDF2Graph and RDFSimpleCon)
  3. Validate the data against the given constraints

Prerequisites

  • JDK 17
  • Maven (mvn --version >= 3.8.3)
  • NodeJS (node available to all users in $PATH)
  • NPM (npm available to all users in $PATH)

Compile and Run

To build for development run $ mvn clean install inside the kg-shapes directory

To build for production run $ mvn clean install -Pproduction inside the kg-shapes directory

To start the application server in development mode run $ mvn wildfly-jar:dev-watch inside the framework folder, after executing the step before.

To compile the application server for production run $ mvn wildfly-jar:package -Pproduction, and start it with $ mvn wildfly-jar:run -Pproduction (run both commands inside the framework folder).

Refer to https://docs.wildfly.org/bootablejar/ for more options.

Adjustable Parameters

The started application server in this project is thought to be started alongside with an incorporating frontend.

To establish a working environment one can adjust some settings inside the project pom.xml inside the <properties> section.

Property name Description
frontend.url Is used to calculate CORS Headers, should be equal to the URL where the frontend resides
backend.ip Is used to make the application listen to a given IP address (on port 8080)
api.key Each request to the RestFUL-API must be accompanied by a api-key-header with the value which is set by this property
debug Determines if the server is started in DEBUG mode, offering debugging port 5005 and not requiring the api-key-header