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

Force the use of @id in place of identifier for GeoNetwork SO #68

Open
iannesbitt opened this issue Jan 23, 2025 · 6 comments
Open

Force the use of @id in place of identifier for GeoNetwork SO #68

iannesbitt opened this issue Jan 23, 2025 · 6 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@iannesbitt
Copy link
Contributor

We've identified some GeoNetwork repositories that incorrectly use @id instead of identifier to define the dataset id. While this is technically incorrect in SO parlance, it is part of some (older?) GeoNetwork versions and thus in use in production environments. To correct for this, the SO normalization process should be able to treat @id as if it were the identifier field.

This can be achieved by setting "use_at_id": true in the SO node settings.json file.

@iannesbitt
Copy link
Contributor Author

Unfortunately, I had to commit a grave sin in order to make this work. The opersist Thing model wouldn't accept a json document that didn't have an identifier definition. So when the use_at_id settings flag is set, during SO normalization, I just copy the @id to identifier.

I know it's not in the spirit of the network's metadata harvesting practice, but I don't want to have to mess with how the model is structured. I suppose it's "in kind" with the sins that GeoNetwork is committing...

@mbjones
Copy link
Member

mbjones commented Jan 23, 2025

@datadavev can you review this set of changes please?

@iannesbitt
Copy link
Contributor Author

I made a mistake and committed directly to the develop branch, let me know if you'd like me to roll those back before you review @datadavev

@datadavev
Copy link
Member

This all looks OK. Using @id isn't so terrible, but not preferred.

There is a question of what happens in the future should the geonetwork sources change, though I think these changes are good.

@iannesbitt
Copy link
Contributor Author

Since this is a repo-specific setting, it can easily be turned off if Geonetwork restructures their schema.org definitions.

@iannesbitt
Copy link
Contributor Author

  • Make sure SHA-256 doesn't change when use_at_id flag is changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants