Validation, traversal and transformation of RDF graphs.
Shape Expressions is a structural schema language for RDF graphs. It allows one to describe profiles of data like this:
# our EmployeeShape reuses the FOAF ontology <EmployeeShape> { # An <EmployeeShape> has: foaf:givenName xsd:string+, # at least one givenName. foaf:familyName xsd:string, # one familyName. foaf:phone IRI*, # any number of phone numbers. foaf:mbox IRI # one FOAF mbox. }
# Employee7 matches EmployeeShape <http://a.example/Employee7> foaf:givenName "Robert", "Taylor" ; foaf:familyName "Johnson" ; # no phone number needed foaf:mbox <mailto:rtj@example.com> .
Features
- datatype constraints
- value sets
- XML Schema facets
- nested shapes
- additive property constraints
- algabraics (or, and)
- negated properties
- incoming arcs
- node kind (IRI, BNode or literal)
- open/closed shapes and properties
- JSON schema format
- JSON validation results
-
Validators
Implementation Platform/Language shex.js (wiki,repo), runs on n3.js ShExJava Java ShEx-s Scala (Jena or RDF4J) Ruby ShEx Ruby PyShEx Python Apache Jena ShEx Java (repo) -
WebApps
try it! repo Environment rdfshape github public React shex-simple github public custom js shexmap-simple github public custom js shex-author github public React ace-shexc github public Ace Editor YaShE github public Javascript -
Tools
Tool Description sheXer automatic extraction of ShEx schemata in RDF graphs shex-form use ShEx to create and populate HTML forms ST3 shexc.syntax Syntax highlighting for ShExC in Sublime Text 3 VSCode ShEx Extensions Syntax highlighting for ShExC in VSCode ShExML map and merge heterogeneous data sources shexc-mode An Emacs mode for editing ShEx (good for Turtle too). -
Tutorials