Skip to content

Commit

Permalink
Version 0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
herminiogg committed Jan 12, 2024
1 parent 965d00b commit eab0771
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 20 deletions.
85 changes: 67 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# ShExML
![Master build](https://github.com/herminiogg/shexml/actions/workflows/scala.yml/badge.svg?branch=master)
![Maven Central](https://img.shields.io/maven-central/v/com.herminiogarcia/shexml_3?color=blue)

Shape Expressions Mapping Language (ShExML) is a DSL that offers a solution
for mapping and merging heterogeneous data sources. As being based on ShEx the
shape is the main foundation to define the transformations.
Expand Down Expand Up @@ -52,29 +55,46 @@ square brackets. More complex example can be seen under the ````films.shexml````
* Named graphs
* Autoincrement ids

The full specification with all the supported features and examples can be consulted [here](https://shexml.herminiogarcia.com/spec/).

## Usage

### CLI
A command line interface is offered under the jar library with the following options available:
```
Usage: ShExML [-hrV] [-f=<format>] -m=<file> [-o=<output>] [-p=<password>]
Usage: ShExML [-hrsV] [-id] [-nu] [-rp] [-sh] [-shc] [-sm] [-d=<drivers>]
[-f=<format>] -m=<file> [-o=<output>] [-p=<password>]
[-u=<username>]
Map and merge heterogeneous data sources with a Shape Expressions based syntax
-f, --format=<format> Output format for RDF graph. Turtle, RDF/XML,
N-Triples, ...
-h, --help Show this help message and exit.
-m, --mapping=<file> Path to the file with the mappings
-o, --output=<output> Path where the output file should be created
-p, --password=<password>
Password in case of using a database
-r, --rml Generate RML output
-s, --shex Generate ShEx validation
-sh, --shacl Generate SHACL validation
-shc, --shaclClosed Generate SHACL validation with closed shapes as
default
-u, --username=<username>
Username in case of using a database
-V, --version Print version information and exit.
-d, --drivers=<drivers> Add more JDBC database drivers in the form of
<startJDBCURL>%<driver> and separating them with
";". Example: jdbc:postgresql%org.postgresql.
Driver;jdbc:oracle%oracle.jdbc.OracleDriver
-f, --format=<format> Output format for RDF graph. Turtle, RDF/XML,
N-Triples, ...
-h, --help Show this help message and exit.
-id, --inferenceDatatypes
Use the inference system for choosing the best
suited datatype for the generated literal.
Without this option, and not declaring a
datatype in the mapping rules, all the literals
will be outputted as strings
-m, --mapping=<file> Path to the file with the mappings
-nu, --normaliseURIs Activate the URI normalisation system which allows
to avoid malformed URIs when using strings for
URI creation
-o, --output=<output> Path where the output file should be created
-p, --password=<password> Password in case of using a database
-r, --rml Generate RML output
-rp, --rmlPrettified Generate RML output using Blank nodes for better
readability
-s, --shex Generate ShEx validation
-sh, --shacl Generate SHACL validation
-shc, --shaclClosed Generate SHACL validation with closed shapes as
default
-sm, --shapeMap Generate Shape Map for ShEx validation
-u, --username=<username> Username in case of using a database
-V, --version Print version information and exit.
```
Therefore, to execute the films example: ```java -jar shexml.jar -m films.shexml```

Expand All @@ -88,5 +108,34 @@ val output = mappingLauncher.launchMapping(file, "TURTLE")
```

### Webpage
Also a live demo is offered online (http://shexml.herminiogarcia.com). However, due to hardware limitations it is not
intended for intesive use.
A live playground is also offered online (http://shexml.herminiogarcia.com). However, due to hardware limitations it is not
intended for intensive use.

### Citation
This tool is part of a scientific project which has led to different publications. The main and preferred publication for citation is:
```
García-González, H., Boneva, I., Staworko, S., Labra-Gayo, J. E., & Lovelle, J. M. C. (2020).
ShExML: improving the usability of heterogeneous data mapping languages for first-time users.
PeerJ Computer Science, 6, e318.
```

Other possible publications per topic are:
* Translation from ShExML to RML
```
García-González, H., & Dimou, A. (2022, September). Why to tie to a single data mapping language?
enabling a transformation from shexml to rml. In Proceedings of Poster and Demo Track and Workshop
Track of the 18th International Conference on Semantic Systems co-located with 18th International
Conference on Semantic Systems (SEMANTiCS 2022) (Vol. 3235, pp. paper-11).
```
* Addressing mapping challenges with ShExML
```
García-González, H. (2021, June). A ShExML perspective on mapping challenges: already solved ones,
language modifications and future required actions. In 2nd International Workshop on Knowledge Graph
Construction co-located with 18th Extended Semantic Web Conference (ESWC 2021), Online, June 6, 2021,
CEUR Workshop Proceedings (vol. 2873)
```
* Inception poster
```
Garcia-Gonzalez, H., Fernandez-Alvarez, D., & Gayo, J. E. L. (2018). ShExML: An Heterogeneous Data
Mapping Language based on ShEx. In EKAW (Posters & Demos) (pp. 9-12).
```
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val shexml = project
.in(file("."))
.settings(
name := "ShExML",
version := "0.4.0",
version := "0.4.1",
scalaVersion := "3.2.0",
crossScalaVersions := Seq("2.12.17", "2.13.9", "3.2.0"),
libraryDependencies ++= Seq(
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/com/herminiogarcia/shexml/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object Main {

}

@Command(name = "ShExML", version = Array("v0.4.0"),
@Command(name = "ShExML", version = Array("v0.4.1"),
mixinStandardHelpOptions = true,
description = Array("Map and merge heterogeneous data sources with a Shape Expressions based syntax"))
class Main extends Callable[Int] {
Expand Down Expand Up @@ -82,6 +82,7 @@ class Main extends Callable[Int] {
} else if(shaclClosedOutput) {
mappingLauncher.launchSHACLGeneration(fileContent, true)
} else {
Thread.sleep(20000)
mappingLauncher.launchMapping(fileContent, format)
}
if(output.isEmpty) println(outputContent) else {
Expand Down

0 comments on commit eab0771

Please sign in to comment.