rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

GH-4622 SHACL Validation Report preserve blank node IDs with remote repositories

Open hmottestad opened this issue 2 years ago • 3 comments

GitHub issue resolved: #4622

Briefly describe the changes proposed in this PR:

  • switch to RDF4J Binary RDF since this format doesn't rename blank node IDs
  • add parser config option to preserve blank node IDs
  • add test

PR Author Checklist (see the contributor guidelines for more details):

  • [ ] my pull request is self-contained
  • [ ] I've added tests for the changes I made
  • [ ] I've applied code formatting (you can use mvn process-resources to format from the command line)
  • [ ] I've squashed my commits where necessary
  • [ ] every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

hmottestad avatar Jun 08 '23 08:06 hmottestad

It all looks technically correct to me, but I'm puzzled by why you'd need blank node preservation here in the first place.

It's normally something that we only use in very specific internal client-server comms use cases (e.g. in supporting remote transactions). I don't think we ever use it (or recommend using it) for somehow allowing a user to reference a bnode by id remotely.

Also: we tend to use RDF Binary everywhere else to support this: why choose RDF/JSON in this case?

I haven't tried using RDF Binary. I'll test it out.

The reason I need to preserve blank node identifiers is that this is a transfer of the validation exception from the server to the client. The user would then typically want to find out more about what went wrong by retrieving the full shape from the server. It's common practice to use blank nodes for PropertyShape(s), so that's why we need to preserve the blank node identifiers.

hmottestad avatar Jun 11 '23 13:06 hmottestad

TODO

  • [ ] Add test to make sure the client still works with the old server

hmottestad avatar Jun 15 '23 11:06 hmottestad

I think that this should be split into two branches. One with a simple fix that just changes out the format to binary, and a second that changes things up a bit by using the http body. The second branch should also bump the protocol version and target the develop branch.

hmottestad avatar Jul 24 '23 01:07 hmottestad