/rdfshape-api

API for validating and transforming RDF, ShEx, SHACL and more.

Primary LanguageScalaMIT LicenseMIT

RDFShape

RDFShape is web API for semantic data analysis and validation implemented in Scala using the http4s library.

This repository contains the backend part of RDFShape and acts as a queryable API to be consumed by clients. To learn more about our public client, see its GitHub repository or try it.

Continuous Integration Docker build

Codacy

Deployed versions of RDFShape API

RDFShape is already deployed here.

Quick reference

Installation

Deploy locally

Requirements

  • RDFShape API requires SBT to be built

Steps

  1. Clone this repository
  2. Go to directory where RDFShape source code is located and execute sbt run
  3. After some time downloading dependencies and compiling the source code, the application will start and be accessible at localhost:8080
  4. To use a different port run sbt "run --server --port <PortNumber>"

Deploy with Docker

Building the image

  • When building the Docker image, you may provide the following arguments via --build-arg:
    • GITHUB_TOKEN [required]:
      • A valid GitHub token to download WESO project dependencies from Github packages. This is required when manually building the image.
      • Images available in GCR have already been built using a read-only token for downloading the dependencies.

Running containers

  • When running a container, you may provide the following environment variables via --env:
    • PORT [optional]:
      • Port where the API is exposed inside the container. Default is 8080.

Supported tags

  • :stable: Stable build updated manually.
  • <:hashed_tags>: Automated builds by our CI pipeline. With the latest features uploaded to our repository but lacking internal testing.

Dependencies

RDFShape server has been implemented in Scala using the following libraries:

  • SHaclEX: a Scala implementation of ShEx and SHACL.
  • http4s: a purely functional library for http.
  • cats: a library for functional programming in Scala.
  • UMLShaclex: contains the visualization code that converts schemas to UML diagrams.
  • SRDF: is the library used to handle RDF. It is a simple interface with 2 implementations, one in Apache Jena, and the other in RDF4j.
  • Any23: is used by RDFShape to convert HTML files in RDFa and Microdata to RDF.
  • Topbraid SHACL API: is used to add another SHACL engine apart of the SHaclEX and Apache Jena SHACL engines.

Contribution and issues

Contributions are greatly appreciated. Please fork this repository and open a pull request to add more features or submit issues:

RdfShape contributors