As part of the European Joint Programme (EJP) for Rare Disease, we are developing standards for rare disease registries to describe their metadata that will improve the FAIR-ness of these resources.
This service provides a REST endpoint that enables users to validate a turtle file against a SHeX shape. In response this service will return a detailed validation report.
This codebase uses Java 11 and Maven 3.2+ to build and run the application.
git clone https://github.com/ejp-rd-vp/resource-metadata-validator.git
mvn clean package
java -jar ./target/resource-metadata-validator-0.0.1-SNAPSHOT.jar
This will run a local instance of the application on port 8080.
The application accepts HTTP POST requests with the following parameters:
Returns: A detailed or compacted report on the validation requested.
Assuming $PROJECT_ROOT points to the top directory of this codebase, the following cURL command can be used to validate Organization data:
curl -F "data=@$PROJECT_ROOT/src/test/resources/metamodel/organization.ttl" \
-F "shex=@$PROJECT_ROOT/src/test/resources/metamodel/organization.shex" \
-F "mapping=@$PROJECT_ROOT/src/test/resources/metamodel/organization.sm" \
-F "showDetail=true" localhost:8080/api/resource-metadata-validator/validateShex
curl -F "data=@$PROJECT_ROOT/src/test/resources/metamodel/organization.ttl" ^
-F "shex=@$PROJECT_ROOT/src/test/resources/metamodel/organization.shex" ^
-F "mapping=@$PROJECT_ROOT/src/test/resources/metamodel/organization.sm" ^
localhost:8080/api/resource-metadata-validator/validateShex
Documentation can be found at $HOST/api/resource-metadata-validator/docs.html and the JSON description of the API can be found at $HOST/api/resource-metadata-validator/docs. A currently hosted instance can be found at http://45.88.81.202/api/resource-metadata-validator/docs.html.