rdf4j
rdf4j copied to clipboard
GH-4622 SHACL Validation Report preserve blank node IDs with remote repositories
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-resourcesto 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
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.
TODO
- [ ] Add test to make sure the client still works with the old server
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.