Giter Club home page Giter Club logo

hermes's Introduction

Hermes: A ShExCSV to ShExC Translator

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.

How to use

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

Prefixes File

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/
... ...

Shapes File

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
... ... ... ... ...

Generated File

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} ;
}

License

Hermes is primarily distributed under the terms of the MIT license.

See LICENSE for details.

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.