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

Replace Enola "hack" with "proper" (full) RDF Dataset Canonicalization #1103

Open
vorburger opened this issue Feb 22, 2025 · 2 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed java Pull requests that update Java code

Comments

@vorburger
Copy link
Member

vorburger commented Feb 22, 2025

Replying to @filip26 on filip26/ld-cli#71 today reminded me of (my) RdfCanonicalizer, and how that was a "quick hack", but not yet a "real" (full) implementation of https://github.com/w3c/rdf-canon/.

One can still already use it as-is via Enola's CLI as https://docs.enola.dev/use/canonicalize/ though. I originally wrote it, and currently actively use it, in the ModelSubject utility (which is a sort of "Matcher" for unit testing, for Truth).

But perhaps one day, especially if in the future it might also be used for (H)MAC hashing for "security" related ideas, or in the context of some things I'm dreaming about (but unfortunately don't really have much time for exploring, at my current day job workload...) e.g. in the #777 (IPFS IPLD & Co.) context, it would make sense to replace that original initial first quick stab with a "real" (full) implementation of https://github.com/w3c/rdf-canon/, one day.

Looking at https://w3c.github.io/rdf-canon/reports/, the candidate (Java) libraries seem to be:

  1. https://project.inria.fr/corese/ - probably much too huge?
  2. https://github.com/setl/rdf-urdna - looks better and somewhat more self contained already
  3. https://github.com/filip26/titanium-rdfc - not listed on rdf-canon/reports (yet?), but maybe the way to go?
  4. Isn't there something alreaddy directly using the RDF4j API? I've created rdf-canon (RDF Dataset Canonicalization) support eclipse-rdf4j/rdf4j#5255 about it.
@vorburger
Copy link
Member Author

Looking at https://w3c.github.io/rdf-canon/reports/, the candidate (Java) libraries seem to be:

Next step could be to explore, one day (not a high priority for me right now), just locally downstream in Enola, before further engaging upstream, if RdfCanonicalizer really needs the full https://github.com/filip26/titanium-json-ld/, or could be reduced to only require com.apicatalog.rdf.api.RdfQuadConsumer (as-is?), and then engage on apache/jena#2216 to see if proposing a separately released com.apicatalog:rdf-api sort of artefact would make any sense.

@filip26
Copy link

filip26 commented Feb 24, 2025

if RdfCanonicalizer really needs the full https://github.com/filip26/titanium-json-ld/, or could be reduced to only require com.apicatalog.rdf.api.RdfQuadConsumer (as-is?)

The next version, 2.0, which I hope will be released in a week or two, should depend only on RDF artifacts that are now part of Titanium (they will be removed from the next Titanium release). It is primarily used to obtain an N-Quads serialized representation, which is part of the canonicalization process. The long-term goal is to have it as self-contained as possible with minimal dependencies. However, further separation of artifacts beyond RdfQuadConsumer is more complex. The separation process will be incremental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed java Pull requests that update Java code
Projects
None yet
Development

No branches or pull requests

2 participants