Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a DCAT-AP converter using RDF #932

Merged
merged 12 commits into from
Sep 25, 2024
Merged

Implement a DCAT-AP converter using RDF #932

merged 12 commits into from
Sep 25, 2024

Conversation

jahow
Copy link
Collaborator

@jahow jahow commented Jul 4, 2024

Description

This PR introduces a new metadata converter for the DCAT-AP profile. The Metadata Converter app has been modified to allow handling this new format.

Limitations:

  • writing to DCAT-AP is very limited for now
  • reading is limited to certain fields of the model (i.e. no extents, no licence/constraints, etc.)
  • Certain fields of the model are not read yet

Note that the converter can handle either RDF/XML, JSON-LD or Turtle (both for input and output).

This also fixes a bug where the original XML of a record was lost when it was modified and saved!

Architectural changes

Added DcatApConverter class in libs/api/metadata-converter

Screenshots

image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Jul 4, 2024

Affected libs: api-metadata-converter, api-repository, feature-catalog, feature-record, feature-router, feature-editor, feature-search, feature-map, feature-dataviz, feature-auth, ui-search, common-domain, common-fixtures, ui-elements, feature-notifications, ui-catalog, util-shared, ui-widgets, ui-inputs, ui-layout, ui-map, ui-dataviz, database-dump, data-access-datafeeder, util-data-fetcher, util-app-config, data-access-gn4, util-i18n,
Affected apps: metadata-converter, metadata-editor, datahub, demo, webcomponents, map-viewer, search, datafeeder, data-platform,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Jul 4, 2024

📷 Screenshots are here!

@jahow jahow force-pushed the semantic-converter branch 2 times, most recently from 48b7000 to 9d6c6b0 Compare July 4, 2024 12:40
@jahow jahow changed the title [WIP] Implement a DCAT-AP converter using RDF Implement a DCAT-AP converter using RDF Jul 4, 2024
@jahow jahow changed the title Implement a DCAT-AP converter using RDF [WIP] Implement a DCAT-AP converter using RDF Jul 4, 2024
@jahow jahow changed the title [WIP] Implement a DCAT-AP converter using RDF Implement a DCAT-AP converter using RDF Sep 20, 2024
@jahow jahow force-pushed the semantic-converter branch 3 times, most recently from e4a4a30 to a1aaa4b Compare September 20, 2024 09:57
@coveralls
Copy link

coveralls commented Sep 20, 2024

Coverage Status

coverage: 83.986% (+1.8%) from 82.189%
when pulling 4219ecc on semantic-converter
into e5f8e61 on main.

Copy link
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the big work @jahow ! Code LGTM as far as I can see.

When doing some quick testing with https://github.com/w3c/dxwg/blob/gh-pages/dcat/examples/basic-example.jsonld or ttl in the converter app I get errors when I switch to the ISO formats.

Error for ttl: Failed: Could not determine role code from role: pointOfContact
Error for jsonId: Failed: Invalid time value

@@ -11,7 +11,7 @@ <h1 class="text-[50px] font-bold font-title my-6 mx-10">
></gn-ui-status>
</h1>
</div>
<div class="grow p-3">
<div class="grow shrink-0 p-3 min-w-[50%]">
<input
type="file"
accept=".xml, application/xml"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably add jsonId and ttl here now.

@jahow
Copy link
Collaborator Author

jahow commented Sep 24, 2024

Thank you for trying things out! I'll look into it

@jahow
Copy link
Collaborator Author

jahow commented Sep 24, 2024

@tkohr I've addressed your comments, some mandatory fields of a record were indeed not filled with the DCAT-AP converter. I also tweaked the DCAT output so that it can sort of work with the GN DCAT-AP plugin :)

Copy link
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the conversion of the jsonld file above now works in the converter. Still getting an error for the same example in ttl though: status.component.ts:90 TypeError: Cannot read properties of undefined (reading 'name') at write-parts.ts:222:39. Watch out the CI also turned red.

@jahow jahow merged commit 614b0d9 into main Sep 25, 2024
13 checks passed
@jahow jahow deleted the semantic-converter branch September 25, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants