Hermes is developed and maintained by WESO Research Group. Hermes is a Java based library that allows to translate from Shape Expressions tabular formats like ShExCSV to the Shape Expressions Compact Syntax.
This library can be enveloped in to a rest api server and used form other languages but at the moment that feature is not provided within this repository. In order to see the roadmap of the project you can refeer to Long Term Roadmap (LTR) issue.
Once you have your environment ready you can start using Hermes from your CLI as follows:
hermes --prefixesFile=prefixes.csv --shapesFile=shapes.csv --outDir=./out
The prefixes file is a CSV file that contains all the prefix declarations that will be used by the Shape Expressions that are in the shapes.csv
file. The format of this file is as follows:
Prefix | URI |
---|---|
http://example.org/ | |
xsd | http://www.w3.org/2001/XMLSchema# |
foaf | http://xmlns.com/foaf/0.1/ |
... | ... |
The shapes file is a CSV file tht contains all the shapes declarations. It uses the prefixes defined at prefixes.csv
file. The format of this file is as follows:
Shape Label | Constraint Property | Constraint | Min | Max |
---|---|---|---|---|
:User | schema:name | xsd:string | 1 | 1 |
:User | schema:bithday | xsd:date | 0 | 1 |
:User | schema:gender | [ schema:Male schema:Female ] OR xsd:string | 1 | 1 |
:User | schema:owns | @:Car | 0 | - |
:Car | schema:plateNumber | xsd:string | 1 | 1 |
... | ... | ... | ... | ... |
For the previous input files Hermes will generate in te uotput directory a Shape Expression Compact Syntax file as follows:
PREFIX : <http://example.org/>
PREFIX schema: <http://schema.org/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
:User {
schema:name xsd:string {1,1} ;
schema:birthDate xsd:date {0,1} ;
schema:gender [ schema:Male schema:Female ] OR xsd:string {1,1} ;
schema:owns @:Car {0,}
}
:Car {
schema:plateNumber xsd:string {1,1} ;
}
Hermes is primarily distributed under the terms of the MIT license.
See LICENSE for details.