w3c / EasierRDF

Making RDF easy enough for most developers
262 stars 13 forks source link

Mappings between shape languages #64

Open VladimirAlexiev opened 5 years ago

VladimirAlexiev commented 5 years ago

Shapes are important to describe business objects (entities) in RDF, see #63. There are several shape or shape-like languages:

Note: there are other RDF Shape languages (eg OSLC Shapes and DCAP profiles) but they were sort of subsubmed during the Shapes WG effort, and the outcome was SHACL and ShEx.

Each of these shape languages has its adherents and users, each has some strengths and weaknesses. It will be very useful for the community if some conceptual or technical mappings were created between the shape languages. This can help efforts such as:

By no means am I claiming that shape languages are equivalent or have the same strength, or that lossless mappings are possible in all cases. This is not meant to spark a religious war. Exploring the detailed correspondences between these technologies can be very interesting and fruitful. Not least because it can suggest extensions to some of the languages.

There are multi-shape implementations (Shaclex) that I believe have a lot to contribute to this discussion.

cc @HolgerKnublauch @ericprud @jimkont @labra @azaroth42 @gkellogg @msporny

draggett commented 5 years ago

For completeness, you can add SHRL to the list of RDF shape languages. SHRL is based upon Augmented Transition Networks (ATNs) which were developed in the 1970's as a graphical representation of natural language grammars. SHRL rules are expressed directly in RDF. See: https://www.w3.org/WoT/demos/shrl/test.html and https://www.w3.org/WoT/demos/shrl/shape%20rule%20language.pdf

dbooth-boston commented 5 years ago

This is closely related to issue #27, Lack of a standard rules language, because rules can be used to map between shapes (a/k/a data models).

VladimirAlexiev commented 5 years ago

https://www.w3.org/Data/events/data-ws-2019/assets/position/Ruben%20Taelman.pdf compares briefly 4 integrations of RDF and SHACL (half a page for each). By @rubensworks

VladimirAlexiev commented 5 years ago

Jem Rayfield (semantic architect at Ontotext) asked: GraphQL +RDF directive harmonisation anyone? Seems to be various directives floating around @graph @uri @prefix @filter _@href @service etc.. Implementing GraphQL at Ontotext..would like some standards... Pointers to standards/working groups appreciated.

gkellogg commented 5 years ago

You might look at GraphQL-LD.

cc/@rubensworks

HolgerKnublauch commented 5 years ago

I don't think there is a standard or working group on this harmonisation ATM. The mapping that we use is described in https://www.topquadrant.com/technology/graphql/

rubensworks commented 5 years ago

@VladimirAlexiev As far as I know, no collaborative efforts exist for this yet, but I would be very interested in setting this up.

VladimirAlexiev commented 5 years ago

@jemrayfield

VladimirAlexiev commented 4 years ago

@HolgerKnublauch @ericprud @jimkont @labra @azaroth42 @gkellogg @msporny: please comment on https://docs.google.com/document/d/1unO7s2cTk0OqZIAj2iN_6ghcqJc0nT8A8NB3mLg-WLk/edit "input to the creation of a W3C community group that focuses on analyzing methods for accessing RDF data using GraphQL queries" by @rubensworks. In its second half I've proposed to include this issue in the CG scope.

lonniev commented 3 years ago

Is the community making progress in forming - since the January 2020 update above?

lonniev commented 3 years ago

@VladimirAlexiev asks about federated GraphQL mutations. Is there support in Apollo for distributed transactions with all-or-none commitments? When transforming shapes, an issue is that the composition hierarchy may differ between the various shape languages and modification updates stated in GraphQL (or in any interface language) might involve multiple updates to multiple repositories where all updates must commit or none are allowed to commit. I think of it as “transactional distributed schematic ontological transformation”. (I’m going to go read more about Apollo; it’s new to me.)

namedgraph commented 3 years ago

The obvious solution for mappings is SPARQL CONSTRUCT. I don't get how you can suggest GraphQL without even mentioning SPARQL.

SemanticBeeng commented 3 years ago

Each of these shape languages has its adherents and users, each has some strengths and weaknesses. It will be very useful for the community if some conceptual or technical mappings were created between the shape languages.

+1 for the use case / application of building data catalogs / asset catalogs / feature registryes and technology independent data APIs / #DAPI

TopQuandrant has an interesting extension to GraphQL and mapping to SHACL: "GraphQL Schemas to RDF/SHACL" Some highlights here and here image image