-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
we have been working to implement the SKG-IF in ROHub
The first demo implementation used a json template to generate the output in the form we expect.
However, instead of making a json(-ld) file “manually” we want now to generate it directly from our graph data (as RO are graphs as you know).
The problem is that our skg context is having some challenges.
Among others, it defines multiple aliases for the same property (for the same entity type).
This can be used to get the triples from a json-ld using this context, no problem,
But getting back from triples to the json-ld we want is not achievable directly.
Another similar problem is the class property defined as rdf:type as well, there is not way to get this directly from triples.
Of course both problems can be addressed by creating some "fake" triples so it will be possible to get
Other issues were about
- using @type = @vocab in some properties that are not having as value terms from the context necessarly
- missing @container = @set for various terms which are expected to be arrays in the final serialization
I have made the best possible transformation from rdf triples to get skg-if.
I created a frame, with various changes from the original context.
Note i dont define all the terms from skg context as i dont need them all for rohub.
You can find all the results in https://github.com/rohub/skg/tree/main/implementation
You will find input file with triples, the frame, a small script to generate the json-ld (framed) and the output i get, which is perfectly aligned with the skg-if. To get that, though, i had to add two "fake" triples and make the corredsponding changes in frame context, namely to get the product_type and the class ( i used fake properties rdf:subtype and rdf:type2)