ShExJava currently implements the specification of ShEx 2.0 that can be found at the following address: http://shex.io/shex-semantics/index.html. The implementation is released under the LGPL-3.0 licence. It comes with support for the two RDF java libraries, RDF4J and Jena. ShExJava can parse ShEx schema in the ShEcC, ShEJ, ShExR formats and can serialize a schema in ShExJ.
To validate data against a ShExSchema using ShExJava, you have two different algorithms:
- the refine algorithm: compute once and for all the typing for the whole graph
- the recursive algorithm: compute only the typing required to answer a validate(node,ShapeLabel) call and forget the results.
Examples of using the library on small examples can be found on the source code page. To play with small example, it's also possible to use the demonstrator that comes with a set of example.