Giter VIP home page Giter VIP logo

shaclexjava's Introduction

SHaclEX-java example client

SHaclEX client using Java.

This repository contains a simple command line Java program that runs the SHaclEX validator.

The code uses Maven to manage the project.

Run the tests

mvn test

Create a standalone Jar

mvn clean compile package

Validating example using SHACL

The following line validates a turtle RDF file against a SHACL shapes graph

java -jar target/shaclexjava.jar -d examples/issue.ttl -s examples/issue.shacl 

It runs SHaclEX and validates the nodes according to the shapeMap.

The output is a validation report.

Result:[
  {
    "node" : "<http://example.org/x>",
    "shape" : "<http://example.org/IssueShape>",
    "status" : "conformant",
    "appInfo" : "Shaclex",
    "reason" : ":unassigned == :unassigned"
  },
  {
    "node" : "<http://example.org/john>",
    "shape" : "<http://example.org/UserShape>",
    "status" : "conformant",
    "appInfo" : "Shaclex",
    "reason" : "John Smith has datatype xsd:string\n<mailto:[email protected]> is an IRI"
  }
]

It is also possible to validate data in other formats, like JSON-LD:

java -jar target/shexjava.jar -d examples/wot.lsonld -df JSON-LD -s examples/wot.shex -m examples/wot.shapeMap

It is also possible to show the schema in different formats with the option showSchema. The following example validates and shows the ShEx schema in Turtle format:

java -jar target/shexjava.jar -d examples/issue.ttl -s examples/issue.shex -m examples/issue.shapeMap --showSchema --outSchemaFormat Turtle

shaclexjava's People

Contributors

labra avatar

Watchers

 avatar Pablo Menéndez ◔_◔  avatar  avatar

shaclexjava's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.