OpenEnergyPlatform / OpenEnergyPlatform/oemetadata

JSON-LD Context must be improved to allow for RDF serialization

Open
#318 4 comments 2 reactions 1 assignee View on GitHub

@Cpprentice is already working on this.

Since Jul 30, 2026.

Dominant language
Python
Stars
26
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Description of the issue

During the Metadata Mapping Hackathon in mid July we encountered a set of issues with the OEMetadata JSON-LD context.json file that causes the RDF serialization of OEMetadata to be broken on multiple ends.

The first major issue is that the "@nest" is often used at the wrong place, e.g. producing the rdfs:label for the Dataset to also include the metaMetadata license name. This happens multiple times throughout the standard.

The second big issue is that a JSON-LD Context is meant to give the predicates to create RDF. However, in OEMetadata we often use classes instead of predicates for the "@id" definitions. This is semantically wrong.

Third, several metadata keys are not properly reflected in the context at all, causing several sections to be missing entirely from the RDF.

The fourth issue is that the predicates that are used are often neglecting the domain and ranges defined for that property. This could be improved at many places, but compared two the previous two is not a game changer. Especially because many metadata standards do have semantics for "rangeIncludes" rather than fixed ranges.

Ideas of solution

I have been working on a fix to the issues desribed above. The changes are rather severe and will need a lot of discussion to get it right. But I guess it is important to get a good starting point. That's why I will create feature branch and push the changes so we can discuss about that.

In particular for the issues above I recommend the following:

  • Fix the nesting and be fine with blank nodes - I think they don't hurt us.
  • Replace all classes with reasonable properties. For this I focused on dcterms, dcat and schema, because that makes later mapping to one of these easier if we already use parts of their vocabulary.
  • I tried to make sure that everything from the example.json now has a representation in the RDF - please review and check if I missed something.

I also read through https://github.com/OpenEnergyPlatform/oemetadata/issues/295 of which some issues might be already adressed with my changes but some are likely not. So please also have a look from that perspective again.

Workflow checklist

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.